From 595f8b6d005a6c0653301f9caabdc1ed06092a84 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Tue, 9 Jun 2009 16:37:09 +0200 Subject: [PATCH] rtsp: Only extract the session ID from RTSP responses. --- gst-libs/gst/rtsp/gstrtspconnection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index db4867d..990fa56 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -1722,7 +1722,8 @@ build_next (GstRTSPBuilder * builder, GstRTSPMessage * message, } /* save session id in the connection for further use */ - if (gst_rtsp_message_get_header (message, GST_RTSP_HDR_SESSION, + if (message->type == GST_RTSP_MESSAGE_RESPONSE && + gst_rtsp_message_get_header (message, GST_RTSP_HDR_SESSION, &session_id, 0) == GST_RTSP_OK) { gint maxlen, i; -- 2.7.4