media: Do not stop thread twice if default_prepare() fails
authorOgnyan Tonchev <ognyan@axis.com>
Mon, 14 Apr 2014 13:17:14 +0000 (15:17 +0200)
committerWim Taymans <wtaymans@redhat.com>
Mon, 21 Apr 2014 10:21:37 +0000 (12:21 +0200)
gst/rtsp-server/rtsp-media.c

index a006ece..f1b9cb2 100644 (file)
@@ -2197,18 +2197,12 @@ default_prepare (GstRTSPMedia * media, GstRTSPThread * thread)
   /* ERRORS */
 no_create_rtpbin:
   {
-    /* we are not going to use the giving thread, so stop it. */
-    if (thread)
-      gst_rtsp_thread_stop (thread);
     GST_ERROR ("no create_rtpbin function");
     g_critical ("no create_rtpbin vmethod function set");
     return FALSE;
   }
 no_rtpbin:
   {
-    /* we are not going to use the giving thread, so stop it. */
-    if (thread)
-      gst_rtsp_thread_stop (thread);
     GST_WARNING ("no rtpbin element");
     g_warning ("failed to create element 'rtpbin', check your installation");
     return FALSE;