Commit 8223c5cc authored by Steven Hoving's avatar Steven Hoving Committed by Tim-Philipp Müller

rtsp-media: fix state_lock not locked again when preroll fails

https://bugzilla.gnome.org/show_bug.cgi?id=761399
parent d514bfe2
......@@ -3821,6 +3821,7 @@ static gboolean
default_unsuspend (GstRTSPMedia * media)
{
GstRTSPMediaPrivate *priv = media->priv;
gboolean preroll_ok;
switch (priv->suspend_mode) {
case GST_RTSP_SUSPEND_MODE_NONE:
......@@ -3834,12 +3835,13 @@ default_unsuspend (GstRTSPMedia * media)
gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_PREPARING);
if (!start_preroll (media))
goto start_failed;
g_rec_mutex_unlock (&priv->state_lock);
preroll_ok = wait_preroll (media);
g_rec_mutex_lock (&priv->state_lock);
if (!wait_preroll (media))
if (!preroll_ok)
goto preroll_failed;
g_rec_mutex_lock (&priv->state_lock);
}
default:
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment