Do not take range header if range is invalid
authorYouness Alaoui <youness.alaoui@collabora.co.uk>
Thu, 11 Jul 2013 20:11:55 +0000 (16:11 -0400)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 2 Aug 2013 14:58:20 +0000 (16:58 +0200)
gst/rtsp-server/rtsp-client.c

index dcaffaa..73de18b 100644 (file)
@@ -1086,7 +1086,8 @@ handle_play_request (GstRTSPClient * client, GstRTSPContext * ctx)
 
   /* add the range */
   str = gst_rtsp_media_get_range_string (media, TRUE, unit);
-  gst_rtsp_message_take_header (ctx->response, GST_RTSP_HDR_RANGE, str);
+  if (str)
+    gst_rtsp_message_take_header (ctx->response, GST_RTSP_HDR_RANGE, str);
 
   send_message (client, session, ctx->response, FALSE);