ximagesrc: Fix ximage leaks when buffer has more then one ximage
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 20 May 2014 21:37:49 +0000 (17:37 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 21 May 2014 16:18:01 +0000 (12:18 -0400)
commit0746bca19036a89a3d3cef9265ab6e1a0568d563
tree930e891afddca4f774b3d67801acedca623004e7
parente5854c149bdccedd96bfce5788fa1f6b1a2a9fa2
ximagesrc: Fix ximage leaks when buffer has more then one ximage

From time to time, when the image_pool list has more then 1 element
and I suppose at start, all but 1 pooled ximage are leaked. This is
due to broken algorithm in gst_ximagesink_src_ximage_get(). There was
also a risk of use after free for the case where the ximage size has
changed.

https://bugzilla.gnome.org/show_bug.cgi?id=728502
sys/ximage/gstximagesrc.c