mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
aggregator: Remove the GAP event from the queue before queueing up the GAP buffer
Otherwise check_events() will not remove the GAP event (as the queue tail is not the event anymore but the GAP buffer), then the GAP buffer is handled, then the GAP event is handled again, ... forever.
This commit is contained in:
parent
de7985d46a
commit
7c3bfbb512
1 changed files with 4 additions and 0 deletions
|
@ -1476,6 +1476,10 @@ gst_aggregator_default_sink_event (GstAggregator * self,
|
||||||
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_GAP);
|
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_GAP);
|
||||||
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_DROPPABLE);
|
GST_BUFFER_FLAG_SET (gapbuf, GST_BUFFER_FLAG_DROPPABLE);
|
||||||
|
|
||||||
|
/* Remove GAP event so we can replace it with the buffer */
|
||||||
|
if (g_queue_peek_tail (&aggpad->priv->buffers) == event)
|
||||||
|
gst_event_unref (g_queue_pop_tail (&aggpad->priv->buffers));
|
||||||
|
|
||||||
if (gst_aggregator_pad_chain_internal (self, aggpad, gapbuf, FALSE) !=
|
if (gst_aggregator_pad_chain_internal (self, aggpad, gapbuf, FALSE) !=
|
||||||
GST_FLOW_OK) {
|
GST_FLOW_OK) {
|
||||||
GST_WARNING_OBJECT (self, "Failed to chain gap buffer");
|
GST_WARNING_OBJECT (self, "Failed to chain gap buffer");
|
||||||
|
|
Loading…
Reference in a new issue