Don't parse headers for data messages
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 20 Feb 2009 08:50:15 +0000 (09:50 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 20 Feb 2009 08:52:16 +0000 (09:52 +0100)
Don't try to parse the headers on a data message because they don't have
headers.

gst-libs/gst/rtsp/gstrtspconnection.c

index eaf059d..03ca5cc 100644 (file)
@@ -1173,6 +1173,12 @@ build_next (GstRTSPBuilder * builder, GstRTSPMessage * message,
       {
         gchar *session_id;
 
+        if (message->type == GST_RTSP_MESSAGE_DATA) {
+          /* data messages don't have headers */
+          res = GST_RTSP_OK;
+          goto done;
+        }
+
         /* save session id in the connection for further use */
         if (gst_rtsp_message_get_header (message, GST_RTSP_HDR_SESSION,
                 &session_id, 0) == GST_RTSP_OK) {