mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
queue2: fix deadlock in error path
Don't lock the same lock twice. Spotted by Josep Torre Valles.
This commit is contained in:
parent
63fb18dcd9
commit
a7644b3b1c
1 changed files with 1 additions and 3 deletions
|
@ -2835,17 +2835,15 @@ gst_queue2_src_activate_pull (GstPad * pad, gboolean active)
|
|||
queue->is_eos = FALSE;
|
||||
queue->unexpected = FALSE;
|
||||
queue->upstream_size = 0;
|
||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||
} else {
|
||||
GST_QUEUE2_MUTEX_LOCK (queue);
|
||||
GST_DEBUG_OBJECT (queue, "no temp file, cannot activate pull mode");
|
||||
/* this is not allowed, we cannot operate in pull mode without a temp
|
||||
* file. */
|
||||
queue->srcresult = GST_FLOW_WRONG_STATE;
|
||||
queue->sinkresult = GST_FLOW_WRONG_STATE;
|
||||
result = FALSE;
|
||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||
}
|
||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||
} else {
|
||||
GST_QUEUE2_MUTEX_LOCK (queue);
|
||||
GST_DEBUG_OBJECT (queue, "deactivating pull mode");
|
||||
|
|
Loading…
Reference in a new issue