mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
gstpad: Release pending g_cond_wait() when stopping/pausing task
Otherwise we would deadlock waiting forever for the streaming lock to be released https://bugzilla.gnome.org/show_bug.cgi?id=792341
This commit is contained in:
parent
33e7269c37
commit
6cd783b9fc
1 changed files with 6 additions and 0 deletions
|
@ -6134,6 +6134,9 @@ gst_pad_pause_task (GstPad * pad)
|
|||
if (task == NULL)
|
||||
goto no_task;
|
||||
res = gst_task_set_state (task, GST_TASK_PAUSED);
|
||||
/* unblock activation waits if any */
|
||||
pad->priv->in_activation = FALSE;
|
||||
g_cond_broadcast (&pad->priv->activation_cond);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
/* wait for task function to finish, this lock is recursive so it does nothing
|
||||
|
@ -6219,6 +6222,9 @@ gst_pad_stop_task (GstPad * pad)
|
|||
goto no_task;
|
||||
GST_PAD_TASK (pad) = NULL;
|
||||
res = gst_task_set_state (task, GST_TASK_STOPPED);
|
||||
/* unblock activation waits if any */
|
||||
pad->priv->in_activation = FALSE;
|
||||
g_cond_broadcast (&pad->priv->activation_cond);
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
GST_PAD_STREAM_LOCK (pad);
|
||||
|
|
Loading…
Reference in a new issue