From 53a7a991e2071ba76319351db43f795940cdcbe5 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 13 Apr 2016 16:08:30 +0100 Subject: [PATCH] multiqueue: catch errors and flushing case after lock This ensures we can not get into an indefinite wait on the following cond var wait. https://bugzilla.gnome.org/show_bug.cgi?id=764999 --- plugins/elements/gstmultiqueue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index fa50883..2ee8e85 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -2159,6 +2159,8 @@ gst_multi_queue_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) GST_MULTI_QUEUE_MUTEX_UNLOCK (mq); res = gst_data_queue_push (sq->queue, (GstDataQueueItem *) item); GST_MULTI_QUEUE_MUTEX_LOCK (mq); + if (!res || sq->flushing) + goto out_flushing; /* it might be that the query has been taken out of the queue * while we were unlocked. So, we need to check if the last * handled query is the same one than the one we just -- 2.7.4