rtsp: Only extract the session ID from RTSP responses.
authorPeter Kjellerstedt <pkj@axis.com>
Tue, 9 Jun 2009 14:37:09 +0000 (16:37 +0200)
committerPeter Kjellerstedt <pkj@axis.com>
Wed, 17 Jun 2009 16:02:18 +0000 (18:02 +0200)
gst-libs/gst/rtsp/gstrtspconnection.c

index db4867d..990fa56 100644 (file)
@@ -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;