Set pipeline's state to NULL no matter if the media is reusable and emit unprepared signal in gst_rtsp_media_unprepare

This commit is contained in:
Sebastian Pölsterl 2009-04-21 22:23:54 +02:00 committed by Wim Taymans
parent 9b7cb2a4ef
commit 708c8daaec

View file

@ -1155,13 +1155,13 @@ gst_rtsp_media_unprepare (GstRTSPMedia *media)
if (!media->prepared)
return TRUE;
if (media->reusable) {
g_message ("unprepare media %p", media);
media->target_state = GST_STATE_NULL;
gst_element_set_state (media->pipeline, GST_STATE_NULL);
media->prepared = FALSE;
media->reused = TRUE;
}
g_message ("unprepare media %p", media);
media->target_state = GST_STATE_NULL;
gst_element_set_state (media->pipeline, GST_STATE_NULL);
media->prepared = FALSE;
media->reused = FALSE;
g_signal_emit_by_name (media, "unprepared", NULL);
return TRUE;
}