media: stop thread if media is already prepared

in gst_rtsp_media_prepare() the thread is not used if media is already
prepared (e.g. media shared) so we want to stop the thread. otherwise, a
leak occurs.

https://bugzilla.gnome.org/show_bug.cgi?id=724182
This commit is contained in:
Aleix Conchillo Flaqué 2014-02-11 14:20:39 -08:00 committed by Wim Taymans
parent e631112f33
commit 0bd687f210

View file

@ -2204,6 +2204,8 @@ wait_status:
was_prepared:
{
GST_LOG ("media %p was prepared", media);
/* we are not going to use the giving thread, so stop it. */
gst_rtsp_thread_stop (thread);
g_rec_mutex_unlock (&priv->state_lock);
return TRUE;
}