GNOME Bugzilla – Bug 745159
d3dvideosink: swap chain leak
Last modified: 2015-02-26 12:37:03 UTC
Created attachment 297874 [details] Backtraces There is a massive leak happening from calling d3d_init_swap_chains multiple times in some situations. Real life example: 1. pipeline is set to PLAYING 2. window handle is set on "prepare-window-handle", d3d_init_swap_chains is called the first time in consequence 3. set_caps is called, d3d_init_swap_chains is called the second time - at least sink->d3d.swapchain is lost. This later leads to massive resource leaks when going to NULL. I'm attaching a gdb log showing the above and a basic patch that frees existing swap chain first - this fixes the major leak here, but perhaps d3d_init_swap_chains shouldn't be called multiple times like this in the first place. It might as well fix some other d3dvideosink bugs related to memory leaks. Note: all credits go to Roman Nowicki, I'm only upstreaming it.
Created attachment 297876 [details] [review] d3dvideosink: release existing D3D swap chain on init
Ah, that might also fix another bug. Thanks!
commit 29098129be0af66f4cb430d7afa6d43cb39750c6 Author: Roman Nowicki <r.nowicki@sims.pl> Date: Wed Feb 25 14:48:59 2015 +0100 d3dvideosink: release existing D3D swap chain on init https://bugzilla.gnome.org/show_bug.cgi?id=745159