pool: fix deallocation of video pools.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 12 Jul 2013 13:01:01 +0000 (15:01 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 12 Jul 2013 13:01:01 +0000 (15:01 +0200)
commitac757551050ea328b42ea701c4328ecbd7d279c6
treeecff04282c501aee60774bb509350b6993dec2ef
parent9b3ad4daadab935f09cf632e0576868bf921ec43
pool: fix deallocation of video pools.

The queue of free objects to used was deallocated with g_queue_free_full().
However, this convenience function shall only be used if the original queue
was allocated with g_queue_new(). This caused memory corruption, eventually
leading to a crash.

The correct solution is to pair the g_queue_init() with the corresponding
g_queue_clear(), while iterating over all free objects to deallocate them.
gst-libs/gst/vaapi/gstvaapivideopool.c