mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
multiqueue: Fire the overrun signal on EOS
Fixes startup of some short MPEG files with decodebin2/playbin2 where all the data fits in the multiqueue and EOS arrives before the group is exposed.
This commit is contained in:
parent
638dc67d16
commit
3c87b8850f
1 changed files with 4 additions and 1 deletions
|
@ -169,6 +169,7 @@ static void gst_single_queue_free (GstSingleQueue * squeue);
|
||||||
|
|
||||||
static void wake_up_next_non_linked (GstMultiQueue * mq);
|
static void wake_up_next_non_linked (GstMultiQueue * mq);
|
||||||
static void compute_high_id (GstMultiQueue * mq);
|
static void compute_high_id (GstMultiQueue * mq);
|
||||||
|
static void single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq);
|
||||||
|
|
||||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink%d",
|
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink%d",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
|
@ -1090,6 +1091,7 @@ gst_multi_queue_sink_event (GstPad * pad, GstEvent * event)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
sq->is_eos = TRUE;
|
sq->is_eos = TRUE;
|
||||||
|
single_queue_overrun_cb (sq->queue, sq);
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_NEWSEGMENT:
|
case GST_EVENT_NEWSEGMENT:
|
||||||
apply_segment (mq, sq, sref, &sq->sink_segment);
|
apply_segment (mq, sq, sref, &sq->sink_segment);
|
||||||
|
@ -1312,7 +1314,8 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
|
||||||
ssize.bytes, sq->max_size.bytes, sq->cur_time, sq->max_size.time);
|
ssize.bytes, sq->max_size.bytes, sq->cur_time, sq->max_size.time);
|
||||||
|
|
||||||
/* if this queue is filled completely we must signal overrun */
|
/* if this queue is filled completely we must signal overrun */
|
||||||
if (IS_FILLED (bytes, ssize.bytes) || IS_FILLED (time, sq->cur_time)) {
|
if (sq->is_eos || IS_FILLED (bytes, ssize.bytes) ||
|
||||||
|
IS_FILLED (time, sq->cur_time)) {
|
||||||
GST_LOG_OBJECT (mq, "Queue %d is filled", ssq->id);
|
GST_LOG_OBJECT (mq, "Queue %d is filled", ssq->id);
|
||||||
filled = TRUE;
|
filled = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue