omxbufferpool: fix memory leak if used on output port
authorJulien Isorce <julien.isorce@collabora.co.uk>
Mon, 17 Mar 2014 09:57:11 +0000 (09:57 +0000)
committerJulien Isorce <julien.isorce@collabora.co.uk>
Mon, 17 Mar 2014 18:02:51 +0000 (18:02 +0000)
commite8ca74c6f862e5f1e0bdc5057dc836a71902244e
tree3d44c7961c518b1b1b929fafb36e90d963c16571
parent922d036ae7ea1d6d6b0a193b8930ce5972ee1b68
omxbufferpool: fix memory leak if used on output port

When using GstOMXBufferPool on an output port, it internally uses
a GPtrArray to manage the GstBuffers instead of the default queue
from the GstBufferPool base class.

In this case GstBufferPool::default_free_buffer is not called when
the pool is stopped. Because the queue is empty. So explicitely
call gst_omx_buffer_pool_free_buffer on each buffer contained in
the GPtrArray.

https://bugzilla.gnome.org/show_bug.cgi?id=726337
omx/gstomxbufferpool.c