mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
multiqueue: Protect against spurious wakeups of the condition variable
This commit is contained in:
parent
de65529d52
commit
47f9223750
1 changed files with 2 additions and 1 deletions
|
@ -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
|
* pushed. If it is, we don't need to wait for the condition
|
||||||
* variable, otherwise we wait for the condition variable to
|
* variable, otherwise we wait for the condition variable to
|
||||||
* be signaled. */
|
* 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);
|
g_cond_wait (&sq->query_handled, &mq->qlock);
|
||||||
res = sq->last_query;
|
res = sq->last_query;
|
||||||
sq->last_handled_query = NULL;
|
sq->last_handled_query = NULL;
|
||||||
|
|
Loading…
Reference in a new issue