From 47f9223750af298bc9658172e909d1f60c02dbeb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 13 Dec 2016 21:12:23 +0200 Subject: [PATCH] multiqueue: Protect against spurious wakeups of the condition variable --- plugins/elements/gstmultiqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index d59acaa..fed846d 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -2408,7 +2408,8 @@ gst_multi_queue_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) * pushed. If it is, we don't need to wait for the condition * variable, otherwise we wait for the condition variable to * be signaled. */ - if (sq->last_handled_query != query) + while (!sq->flushing && sq->srcresult == GST_FLOW_OK + && sq->last_handled_query != query) g_cond_wait (&sq->query_handled, &mq->qlock); res = sq->last_query; sq->last_handled_query = NULL; -- 2.7.4