[gst-cvs] gst-rtsp-server: client: warn when we can't do RTP-Info
Wim Taymans
wtay at kemper.freedesktop.org
Sat May 23 07:31:25 PDT 2009
Module: gst-rtsp-server
Branch: master
Commit: 740d71bd50bdcfc3c63dbcf8a0d007f994c7e5ba
URL: http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/commit/?id=740d71bd50bdcfc3c63dbcf8a0d007f994c7e5ba
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Sat May 23 16:30:55 2009 +0200
client: warn when we can't do RTP-Info
---
gst/rtsp-server/rtsp-client.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index 8138cef..b47f81f 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -538,6 +538,9 @@ handle_play_request (GstRTSPClient *client, GstRTSPUrl *uri, GstRTSPSession *ses
infocount++;
}
+ else {
+ g_warning ("RTP-Info cannot be determined for stream %d", i);
+ }
}
/* construct the response now */
@@ -545,8 +548,13 @@ handle_play_request (GstRTSPClient *client, GstRTSPUrl *uri, GstRTSPSession *ses
gst_rtsp_message_init_response (&response, code, gst_rtsp_status_as_text (code), request);
/* add the RTP-Info header */
- str = g_string_free (rtpinfo, FALSE);
- gst_rtsp_message_take_header (&response, GST_RTSP_HDR_RTP_INFO, str);
+ if (infocount > 0) {
+ str = g_string_free (rtpinfo, FALSE);
+ gst_rtsp_message_take_header (&response, GST_RTSP_HDR_RTP_INFO, str);
+ }
+ else {
+ g_string_free (rtpinfo, TRUE);
+ }
/* add the range */
str = gst_rtsp_range_to_string (&media->media->range);
More information about the Gstreamer-commits
mailing list