rtsp-stream: do not take lock in request_aux_receiver
authorMathieu Duponchelle <mathieu@centricular.com>
Fri, 30 Mar 2018 21:10:10 +0000 (23:10 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Fri, 30 Mar 2018 21:10:10 +0000 (23:10 +0200)
Added it right before pushing the previous commit, it is
incorrect and deadlocks because this function gets called
from the join_bin thread, which already holds the lock,
that's the reason why request_aux_sender didn't take the
lock either.

gst/rtsp-server/rtsp-stream.c

index abc0a56..e4563e1 100644 (file)
@@ -2382,8 +2382,6 @@ gst_rtsp_stream_request_aux_receiver (GstRTSPStream * stream, guint sessid)
 
   g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), NULL);
 
-  g_mutex_lock (&stream->priv->lock);
-
   bin = gst_bin_new (NULL);
   stream->priv->rtxreceive = gst_element_factory_make ("rtprtxreceive", NULL);
   update_rtx_receive_pt_map (stream);
@@ -2401,8 +2399,6 @@ gst_rtsp_stream_request_aux_receiver (GstRTSPStream * stream, guint sessid)
   g_free (name);
   gst_object_unref (pad);
 
-  g_mutex_unlock (&stream->priv->lock);
-
   return bin;
 }