d3dvideosink: Deactivate the fallback pool and unref the fallback buffer when resetting
authorSebastian Dröge <sebastian@centricular.com>
Wed, 18 Feb 2015 10:45:22 +0000 (12:45 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 18 Feb 2015 10:45:22 +0000 (12:45 +0200)
Otherwise we will still have a reference to the surface left, which would
prevent activating the sink again later. E.g. after we lost the device.

Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=744615

sys/d3dvideosink/d3dhelpers.c

index 312b913..b131666 100644 (file)
@@ -1342,6 +1342,10 @@ d3d_release_swap_chain (GstD3DVideoSink * sink)
     goto end;
   }
 
+  gst_buffer_replace (&sink->fallback_buffer, NULL);
+  if (sink->fallback_pool)
+    gst_buffer_pool_set_active (sink->fallback_pool, FALSE);
+
   if (sink->d3d.swapchain) {
     ref_count = IDirect3DSwapChain9_Release (sink->d3d.swapchain);
     sink->d3d.swapchain = NULL;