diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-12-13 21:12:23 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-12-18 13:59:12 +0200 |
commit | 47f9223750af298bc9658172e909d1f60c02dbeb (patch) | |
tree | 591d72d83ec8fddcb0825722b588a2b0917b96a3 /plugins | |
parent | de65529d5219c1f837735136a0bce7ae5925654f (diff) |
multiqueue: Protect against spurious wakeups of the condition variable
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstmultiqueue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index d59acaa83..fed846d01 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; |