mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
multiqueue: Add another check for the flushing flag after taking the lock
This prevents another potential deadlock when flushing the pad at exactly the right time.
This commit is contained in:
parent
80eb160e0f
commit
6d97652903
1 changed files with 7 additions and 0 deletions
|
@ -1115,6 +1115,13 @@ gst_multi_queue_loop (GstPad * pad)
|
|||
|
||||
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
|
||||
|
||||
/* Check again if we're flushing after the lock is taken,
|
||||
* the flush flag might have been changed in the meantime */
|
||||
if (sq->flushing) {
|
||||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||
goto out_flushing;
|
||||
}
|
||||
|
||||
/* Update the nextid so other threads know when to wake us up */
|
||||
sq->nextid = newid;
|
||||
|
||||
|
|
Loading…
Reference in a new issue