mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
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
This commit is contained in:
parent
939a7fee6c
commit
53a7a991e2
1 changed files with 2 additions and 0 deletions
|
@ -2159,6 +2159,8 @@ gst_multi_queue_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
|
||||||
res = gst_data_queue_push (sq->queue, (GstDataQueueItem *) item);
|
res = gst_data_queue_push (sq->queue, (GstDataQueueItem *) item);
|
||||||
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
|
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
|
/* 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
|
* while we were unlocked. So, we need to check if the last
|
||||||
* handled query is the same one than the one we just
|
* handled query is the same one than the one we just
|
||||||
|
|
Loading…
Reference in a new issue