multiqueue: Break the loop immediately if we found an empty queue

No need to continue looking at all the others
This commit is contained in:
Sebastian Dröge 2014-01-24 09:28:05 +01:00
parent 4f928547a8
commit 454ee04a22

View file

@ -1931,15 +1931,15 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
if (oq->srcresult == GST_FLOW_NOT_LINKED) { if (oq->srcresult == GST_FLOW_NOT_LINKED) {
GST_LOG_OBJECT (mq, "Queue %d is not-linked", oq->id); GST_LOG_OBJECT (mq, "Queue %d is not-linked", oq->id);
continue; continue;
} }
all_not_linked = FALSE; all_not_linked = FALSE;
GST_LOG_OBJECT (mq, "Checking Queue %d", oq->id); GST_LOG_OBJECT (mq, "Checking Queue %d", oq->id);
if (gst_data_queue_is_empty (oq->queue)) { if (gst_data_queue_is_empty (oq->queue)) {
GST_LOG_OBJECT (mq, "Queue %d is empty", oq->id); GST_LOG_OBJECT (mq, "Queue %d is empty", oq->id);
empty_found = TRUE; empty_found = TRUE;
break;
} }
} }