mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 14:11:15 +00:00
queue/queue2: Ensure that the streaming thread is unlocked after deactivating the srcpad
It might happen that the srcpad task function is never called at all, in which case unlocking everything from there will never happen. Make sure to unlock everything another time after the task function is definitely stopped. https://bugzilla.gnome.org/show_bug.cgi?id=776039
This commit is contained in:
parent
66f46a0df1
commit
ed57611c4f
2 changed files with 8 additions and 0 deletions
|
@ -1729,6 +1729,10 @@ gst_queue_src_activate_mode (GstPad * pad, GstObject * parent, GstPadMode mode,
|
|||
|
||||
/* step 2, make sure streaming finishes */
|
||||
result = gst_pad_stop_task (pad);
|
||||
|
||||
GST_QUEUE_MUTEX_LOCK (queue);
|
||||
gst_queue_locked_flush (queue, FALSE);
|
||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -3509,6 +3509,10 @@ gst_queue2_src_activate_push (GstPad * pad, GstObject * parent, gboolean active)
|
|||
|
||||
/* step 2, make sure streaming finishes */
|
||||
result = gst_pad_stop_task (pad);
|
||||
|
||||
GST_QUEUE2_MUTEX_LOCK (queue);
|
||||
gst_queue2_locked_flush (queue, FALSE, FALSE);
|
||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue