mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
multiqueue: Ignore queue fullness for most events
Use gst_data_queue_push_force() for most events so they are immediately enqueued. Only gap events and actual buffer data will now block when the queue is full. This fixes a problem with non-flushing seek handling where events following a segment-done event would block if they precede the SEGMENT event, since only SEGMENT events would clear the 'eos' state of the multiqueue queue. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5801>
This commit is contained in:
parent
5534527f5a
commit
37ba866d52
1 changed files with 9 additions and 2 deletions
|
@ -2635,6 +2635,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
GstEventType type;
|
||||
GstEvent *sref = NULL;
|
||||
GstPad *srcpad;
|
||||
gboolean is_timed_event = FALSE;
|
||||
|
||||
|
||||
sq = GST_MULTIQUEUE_PAD (pad)->sq;
|
||||
|
@ -2719,6 +2720,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||
}
|
||||
}
|
||||
is_timed_event = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2742,8 +2744,13 @@ gst_multi_queue_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
"Enqueuing event %p of type %s with id %d",
|
||||
event, GST_EVENT_TYPE_NAME (event), curid);
|
||||
|
||||
if (!gst_data_queue_push (sq->queue, (GstDataQueueItem *) item))
|
||||
goto flushing;
|
||||
if (is_timed_event) {
|
||||
if (!gst_data_queue_push (sq->queue, (GstDataQueueItem *) item))
|
||||
goto flushing;
|
||||
} else {
|
||||
if (!gst_data_queue_push_force (sq->queue, (GstDataQueueItem *) item))
|
||||
goto flushing;
|
||||
}
|
||||
|
||||
/* mark EOS when we received one, we must do that after putting the
|
||||
* buffer in the queue because EOS marks the buffer as filled. */
|
||||
|
|
Loading…
Reference in a new issue