mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 11:15:31 +00:00
multiqueue: return upon input when already eos
... rather than hanging incoming thread (as considered full in eos).
This commit is contained in:
parent
efe3c70450
commit
e0f15e666a
1 changed files with 21 additions and 0 deletions
|
@ -1154,6 +1154,10 @@ gst_multi_queue_chain (GstPad * pad, GstBuffer * buffer)
|
|||
sq = gst_pad_get_element_private (pad);
|
||||
mq = sq->mqueue;
|
||||
|
||||
/* if eos, we are always full, so avoid hanging incoming indefinitely */
|
||||
if (sq->is_eos)
|
||||
goto was_eos;
|
||||
|
||||
/* Get a unique incrementing id */
|
||||
curid = mq->counter++;
|
||||
|
||||
|
@ -1183,6 +1187,12 @@ flushing:
|
|||
gst_multi_queue_item_destroy (item);
|
||||
goto done;
|
||||
}
|
||||
was_eos:
|
||||
{
|
||||
GST_DEBUG_OBJECT (mq, "we are EOS, dropping buffer, return UNEXPECTED");
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_UNEXPECTED;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -1250,6 +1260,10 @@ gst_multi_queue_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
/* if eos, we are always full, so avoid hanging incoming indefinitely */
|
||||
if (sq->is_eos)
|
||||
goto was_eos;
|
||||
|
||||
/* Get an unique incrementing id. protected with the STREAM_LOCK, unserialized
|
||||
* events already got pushed and don't end up in the queue. */
|
||||
curid = mq->counter++;
|
||||
|
@ -1294,6 +1308,13 @@ flushing:
|
|||
gst_multi_queue_item_destroy (item);
|
||||
goto done;
|
||||
}
|
||||
was_eos:
|
||||
{
|
||||
GST_DEBUG_OBJECT (mq, "we are EOS, dropping event, return FALSE");
|
||||
gst_event_unref (event);
|
||||
res = FALSE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
static GstCaps *
|
||||
|
|
Loading…
Reference in a new issue