summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2014-03-24 17:49:59 +0100
committerJulien Isorce <julien.isorce@collabora.co.uk>2014-03-24 18:20:51 +0000
commit100e9f998d6f986838f9e27be1ef1d511a9638e3 (patch)
treecc82bfa1c001f3da2966c998dfef96af2d7b805d
parent651e67e32dc309968ecd7ec15c9f30ba90d9897c (diff)
omxbufferpool: return buffers to the pool instead of freeing them
We have to return the buffers back to the pool in when stopping to not mess with the GstBufferPool accounting. The OMX buffers will be freed when those won't be in charge of the pool in the chained up call to 'stop'. Fixes segfaults on finalize and pool not being properly deactivated. https://bugzilla.gnome.org/show_bug.cgi?id=726337
-rw-r--r--omx/gstomxbufferpool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/omx/gstomxbufferpool.c b/omx/gstomxbufferpool.c
index 80bb83e..dfd5c62 100644
--- a/omx/gstomxbufferpool.c
+++ b/omx/gstomxbufferpool.c
@@ -223,8 +223,8 @@ gst_omx_buffer_pool_stop (GstBufferPool * bpool)
* GstBufferPool::free_buffer is not called while stopping the pool
* (because the queue is empty) */
for (i = 0; i < pool->buffers->len; i++)
- gst_omx_buffer_pool_free_buffer (bpool, g_ptr_array_index (pool->buffers,
- i));
+ GST_BUFFER_POOL_CLASS (gst_omx_buffer_pool_parent_class)->release_buffer
+ (bpool, g_ptr_array_index (pool->buffers, i));
/* Remove any buffers that are there */
g_ptr_array_set_size (pool->buffers, 0);