diff options
author | Edward Hervey <edward@centricular.com> | 2018-01-15 18:13:45 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2018-01-15 18:18:40 +0100 |
commit | c04b5efdbd6431d2d9f01f323a4bbcbe23cb740c (patch) | |
tree | dec7e300aff13869e019c770fb367819a7f10427 | |
parent | 505a24ff6843a04e4f75c5e03caa7b2774806fc3 (diff) | |
download | gstreamer-c04b5efdbd6431d2d9f01f323a4bbcbe23cb740c.tar.gz |
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
-rw-r--r-- | gst/gstpad.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c index 2fca5f5c5f..90e9368229 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -6119,6 +6119,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 @@ -6204,6 +6207,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); |