diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-06-25 16:18:41 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-06-26 09:40:29 +0200 |
commit | ad5b76a58d1f30a1b7c4063a3b64ce66a8e35c01 (patch) | |
tree | 7897bc9aa5bd52dbc924e945d2a6ad242db8fa00 /sys/d3dvideosink | |
parent | 53988c9a43389bd82a0ad924b1f389177a57d701 (diff) |
d3dvideosink: release the offscreen surface before the d3d device
The offscreen surface keeps a reference on the d3d device, so if the
device is released first we don't see the reference count debug message
going to 0 as it should be.
Diffstat (limited to 'sys/d3dvideosink')
-rw-r--r-- | sys/d3dvideosink/d3dvideosink.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/d3dvideosink/d3dvideosink.c b/sys/d3dvideosink/d3dvideosink.c index 5af373acb..e00ea6e95 100644 --- a/sys/d3dvideosink/d3dvideosink.c +++ b/sys/d3dvideosink/d3dvideosink.c @@ -2243,13 +2243,6 @@ error: static gboolean gst_d3dvideosink_release_d3d_device (GstD3DVideoSink * sink) { - if (sink->d3ddev) { - int ref_count; - ref_count = IDirect3DDevice9_Release (sink->d3ddev); - sink->d3ddev = NULL; - GST_DEBUG_OBJECT (sink, "Direct3D device released. Reference count: %d", - ref_count); - } if (sink->d3d_offscreen_surface) { int ref_count; ref_count = IDirect3DSurface9_Release (sink->d3d_offscreen_surface); @@ -2257,6 +2250,13 @@ gst_d3dvideosink_release_d3d_device (GstD3DVideoSink * sink) GST_DEBUG_OBJECT (sink, "Direct3D offscreen surface released. Reference count: %d", ref_count); } + if (sink->d3ddev) { + int ref_count; + ref_count = IDirect3DDevice9_Release (sink->d3ddev); + sink->d3ddev = NULL; + GST_DEBUG_OBJECT (sink, "Direct3D device released. Reference count: %d", + ref_count); + } return TRUE; } |