media: Do not stop thread twice if default_prepare() fails

This commit is contained in:
Ognyan Tonchev 2014-04-14 15:17:14 +02:00 committed by Wim Taymans
parent e69241ac97
commit 7cce8e2dde

View file

@ -2197,18 +2197,12 @@ default_prepare (GstRTSPMedia * media, GstRTSPThread * thread)
/* ERRORS */ /* ERRORS */
no_create_rtpbin: 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"); GST_ERROR ("no create_rtpbin function");
g_critical ("no create_rtpbin vmethod function set"); g_critical ("no create_rtpbin vmethod function set");
return FALSE; return FALSE;
} }
no_rtpbin: 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"); GST_WARNING ("no rtpbin element");
g_warning ("failed to create element 'rtpbin', check your installation"); g_warning ("failed to create element 'rtpbin', check your installation");
return FALSE; return FALSE;