From 3828d9769c74e3c66342a1f78848397982ac2f6e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 15 Nov 2018 11:17:59 +0100 Subject: omxbufferpool: fix early input buffer release We used to track the 'allocating' status on the pool. It is used while allocating so output buffers aren't passed right away to OMX and input ones are not re-added to the pending queue. This was causing a bug when exporting buffers to v4l2src. On start v4l2src acquires a buffer, read its stride and release it right away. As no buffer was received by the encoder element at this point, 'allocating' was still on TRUE and so the the buffer wasn't put back to the pending queue and, as result, no longer available to the pool. Fix this by checking the active status of the pool instead of manually tracking it down. The pool is considered as active at the very end of the activation process so we're good when buffers are released during the activation. --- omx/gstomxbufferpool.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'omx/gstomxbufferpool.h') diff --git a/omx/gstomxbufferpool.h b/omx/gstomxbufferpool.h index 71d1afc..a09c825 100644 --- a/omx/gstomxbufferpool.h +++ b/omx/gstomxbufferpool.h @@ -68,8 +68,6 @@ struct _GstOMXBufferPool GstAllocator *allocator; /* Set from outside this pool */ - /* TRUE if we're currently allocating all our buffers */ - gboolean allocating; /* TRUE if the pool is not used anymore */ gboolean deactivated; -- cgit v1.2.1