diff options
Diffstat (limited to 'sys/v4l2/gstv4l2transform.c')
-rw-r--r-- | sys/v4l2/gstv4l2transform.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/v4l2/gstv4l2transform.c b/sys/v4l2/gstv4l2transform.c index f64553246..cfcc3dde9 100644 --- a/sys/v4l2/gstv4l2transform.c +++ b/sys/v4l2/gstv4l2transform.c @@ -468,20 +468,23 @@ gst_v4l2_transform_prepare_output_buffer (GstBaseTransform * trans, if (G_UNLIKELY (ret != GST_FLOW_OK)) goto beach; - pool = gst_base_transform_get_buffer_pool (trans); + do { + pool = gst_base_transform_get_buffer_pool (trans); - if (!gst_buffer_pool_set_active (pool, TRUE)) - goto activate_failed; + if (!gst_buffer_pool_set_active (pool, TRUE)) + goto activate_failed; - GST_DEBUG_OBJECT (self, "Dequeue output buffer"); - ret = gst_buffer_pool_acquire_buffer (pool, outbuf, NULL); - g_object_unref (pool); + GST_DEBUG_OBJECT (self, "Dequeue output buffer"); + ret = gst_buffer_pool_acquire_buffer (pool, outbuf, NULL); + g_object_unref (pool); + + if (ret != GST_FLOW_OK) + goto alloc_failed; - if (ret != GST_FLOW_OK) - goto alloc_failed; + pool = self->v4l2capture->pool; + ret = gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL (pool), outbuf); - pool = self->v4l2capture->pool; - ret = gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL (pool), outbuf); + } while (ret == GST_V4L2_FLOW_CORRUPTED_BUFFER); if (ret != GST_FLOW_OK) { gst_buffer_unref (*outbuf); |