mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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.
This commit is contained in:
parent
53988c9a43
commit
ad5b76a58d
1 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue