diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 246ffbebef..1742131d9b 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1884,12 +1884,13 @@ next: GST_MULTI_QUEUE_MUTEX_UNLOCK (mq); gst_multi_queue_post_buffering (mq); - GST_LOG_OBJECT (mq, "sq:%d AFTER PUSHING sq->srcresult: %s", sq->id, - gst_flow_get_name (sq->srcresult)); + GST_LOG_OBJECT (mq, "sq:%d AFTER PUSHING sq->srcresult: %s (is_eos:%d)", + sq->id, gst_flow_get_name (sq->srcresult), GST_PAD_IS_EOS (sq->srcpad)); /* Need to make sure wake up any sleeping pads when we exit */ GST_MULTI_QUEUE_MUTEX_LOCK (mq); - if (mq->numwaiting > 0 && GST_PAD_IS_EOS (sq->srcpad)) { + if (mq->numwaiting > 0 && (GST_PAD_IS_EOS (sq->srcpad) + || sq->srcresult == GST_FLOW_EOS)) { compute_high_time (mq, sq->groupid); compute_high_id (mq); wake_up_next_non_linked (mq); @@ -2468,7 +2469,7 @@ compute_high_id (GstMultiQueue * mq) if (sq->nextid < lowest) lowest = sq->nextid; - } else if (!GST_PAD_IS_EOS (sq->srcpad)) { + } else if (!GST_PAD_IS_EOS (sq->srcpad) && sq->srcresult != GST_FLOW_EOS) { /* If we don't have a global highid, or the global highid is lower than * this single queue's last outputted id, store the queue's one, * unless the singlequeue output is at EOS */ @@ -2528,7 +2529,7 @@ compute_high_time (GstMultiQueue * mq, guint groupid) if (sq->groupid == groupid && (group_low == GST_CLOCK_STIME_NONE || sq->next_time < group_low)) group_low = sq->next_time; - } else if (!GST_PAD_IS_EOS (sq->srcpad)) { + } else if (!GST_PAD_IS_EOS (sq->srcpad) && sq->srcresult != GST_FLOW_EOS) { /* If we don't have a global high time, or the global high time * is lower than this single queue's last outputted time, store * the queue's one, unless the singlequeue output is at EOS. */