mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
d3dvideosink: destroy device just before final d3d release call
and free overlays after swap chain is released
This commit is contained in:
parent
5e3520a302
commit
d7af30bab9
2 changed files with 2 additions and 2 deletions
|
@ -1427,6 +1427,7 @@ d3d_release_swap_chain (GstD3DVideoSink * sink)
|
||||||
GST_DEBUG_OBJECT (sink, "D3D surface released. Ref count: %d", ref_count);
|
GST_DEBUG_OBJECT (sink, "D3D surface released. Ref count: %d", ref_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_d3d9_overlay_free (sink);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
@ -2507,6 +2508,7 @@ d3d_class_destroy (GstD3DVideoSink * sink)
|
||||||
|
|
||||||
LOCK_CLASS (sink, klass);
|
LOCK_CLASS (sink, klass);
|
||||||
|
|
||||||
|
d3d_class_display_device_destroy (klass);
|
||||||
if (klass->d3d.d3d) {
|
if (klass->d3d.d3d) {
|
||||||
int ref_count;
|
int ref_count;
|
||||||
ref_count = IDirect3D9_Release (klass->d3d.d3d);
|
ref_count = IDirect3D9_Release (klass->d3d.d3d);
|
||||||
|
@ -2814,7 +2816,6 @@ error:
|
||||||
}
|
}
|
||||||
if (reged)
|
if (reged)
|
||||||
UnregisterClass (WndClass.lpszClassName, WndClass.hInstance);
|
UnregisterClass (WndClass.lpszClassName, WndClass.hInstance);
|
||||||
d3d_class_display_device_destroy (klass);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,7 +448,6 @@ gst_d3dvideosink_stop (GstBaseSink * bsink)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (bsink, "Stop() called");
|
GST_DEBUG_OBJECT (bsink, "Stop() called");
|
||||||
d3d_stop (sink);
|
d3d_stop (sink);
|
||||||
gst_d3d9_overlay_free (sink);
|
|
||||||
d3d_class_destroy (sink);
|
d3d_class_destroy (sink);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue