Commit 6d58ec39 authored by Matt Fischer's avatar Matt Fischer Committed by Nicolas Dufresne

v4l2: Block recursive calls to resurect_buffer

When resurrecting a buffer, the subsequent free call can result
in the group-released handler being called again, which causes
a recursive loop.  This patch blocks the signal handler during
the time that it executes, ensuring that the loop will not occur.
parent 545646cc
......@@ -680,6 +680,9 @@ gst_v4l2_buffer_pool_resurect_buffer (GstV4l2BufferPool * pool)
GST_DEBUG_OBJECT (pool, "A buffer was lost, reallocating it");
/* block recursive calls to this function */
g_signal_handler_block (pool->vallocator, pool->group_released_handler);
params.flags =
......@@ -689,6 +692,8 @@ gst_v4l2_buffer_pool_resurect_buffer (GstV4l2BufferPool * pool)
if (ret == GST_FLOW_OK)
gst_buffer_unref (buffer);
g_signal_handler_unblock (pool->vallocator, pool->group_released_handler);
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment