From ed70572c6c0553d00add06aaf6304012bff82cb9 Mon Sep 17 00:00:00 2001 From: Srimanta Panda Date: Wed, 18 Nov 2015 11:14:39 +0100 Subject: [PATCH] rtsp-client: suspend media during setup request SETUP request from clients needs to suspend the media to clear the prerolled buffers. Otherwise it will not affect the prerolled buffer and the prerolled buffers will be incorrect (for example block-size from setup request will not affect the prerolled buffer unless the media is suspended). https://bugzilla.gnome.org/show_bug.cgi?id=758268 --- gst/rtsp-server/rtsp-client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 65b04338d5..0a33e45321 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -1823,6 +1823,9 @@ handle_setup_request (GstRTSPClient * client, GstRTSPContext * ctx) if (sessmedia == NULL) { /* get a handle to the configuration of the media in the session */ media = find_media (client, ctx, path, &matched); + /* need to suspend the media, if the protocol has changed */ + if (media != NULL) + gst_rtsp_media_suspend (media); } else { if ((media = gst_rtsp_session_media_get_media (sessmedia))) g_object_ref (media);