From 454ee04a2271dbbc272ea47a0947ceb5a4d8d38f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 24 Jan 2014 09:28:05 +0100 Subject: [PATCH] multiqueue: Break the loop immediately if we found an empty queue No need to continue looking at all the others --- plugins/elements/gstmultiqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 2f1a1bf..cc2f3fb 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1931,15 +1931,15 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq) if (oq->srcresult == GST_FLOW_NOT_LINKED) { GST_LOG_OBJECT (mq, "Queue %d is not-linked", oq->id); - continue; + continue; } all_not_linked = FALSE; GST_LOG_OBJECT (mq, "Checking Queue %d", oq->id); - if (gst_data_queue_is_empty (oq->queue)) { GST_LOG_OBJECT (mq, "Queue %d is empty", oq->id); empty_found = TRUE; + break; } } -- 2.7.4