mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
d3dvideosink: Remove scary "while (object.refcount > 0) release (object);" code
If there is a memory leak, this isn't the way how it should be fixed.
This commit is contained in:
parent
038cf9eba0
commit
85690b802d
1 changed files with 0 additions and 6 deletions
|
@ -924,16 +924,12 @@ d3d_release_swap_chain (GstD3DVideoSink * sink)
|
||||||
|
|
||||||
if (sink->d3d.surface) {
|
if (sink->d3d.surface) {
|
||||||
ref_count = IDirect3DSurface9_Release (sink->d3d.surface);
|
ref_count = IDirect3DSurface9_Release (sink->d3d.surface);
|
||||||
if (ref_count > 0)
|
|
||||||
while (IDirect3DSurface9_Release (sink->d3d.surface) > 0);
|
|
||||||
sink->d3d.surface = NULL;
|
sink->d3d.surface = NULL;
|
||||||
GST_DEBUG_OBJECT (sink, "D3D surface released. Ref count: %d", ref_count);
|
GST_DEBUG_OBJECT (sink, "D3D surface released. Ref count: %d", ref_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sink->d3d.swapchain) {
|
if (sink->d3d.swapchain) {
|
||||||
ref_count = IDirect3DSwapChain9_Release (sink->d3d.swapchain);
|
ref_count = IDirect3DSwapChain9_Release (sink->d3d.swapchain);
|
||||||
if (ref_count > 0)
|
|
||||||
while (IDirect3DSwapChain9_Release (sink->d3d.swapchain) > 0);
|
|
||||||
sink->d3d.swapchain = NULL;
|
sink->d3d.swapchain = NULL;
|
||||||
GST_DEBUG_OBJECT (sink, "D3D swapchain released. Ref count: %d", ref_count);
|
GST_DEBUG_OBJECT (sink, "D3D swapchain released. Ref count: %d", ref_count);
|
||||||
}
|
}
|
||||||
|
@ -1019,8 +1015,6 @@ d3d_resize_swap_chain (GstD3DVideoSink * sink)
|
||||||
/* Release current swapchain */
|
/* Release current swapchain */
|
||||||
if (sink->d3d.swapchain != NULL) {
|
if (sink->d3d.swapchain != NULL) {
|
||||||
ref_count = IDirect3DSwapChain9_Release (sink->d3d.swapchain);
|
ref_count = IDirect3DSwapChain9_Release (sink->d3d.swapchain);
|
||||||
if (ref_count > 0)
|
|
||||||
while (IDirect3DSwapChain9_Release (sink->d3d.swapchain) > 0);
|
|
||||||
if (ref_count > 0) {
|
if (ref_count > 0) {
|
||||||
GST_WARNING_OBJECT (sink, "Release swapchain refcount: %d", ref_count);
|
GST_WARNING_OBJECT (sink, "Release swapchain refcount: %d", ref_count);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue