gst/rtsp/gstrtspsrc.c: Init value to avoid infinte loops.

Original commit message from CVS:
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_parse_methods):
Init value to avoid infinte loops.
This commit is contained in:
Wim Taymans 2007-05-24 08:14:00 +00:00
parent 77cc870bbc
commit 587d209252
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-05-24 Wim Taymans <wim@fluendo.com>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_parse_methods):
Init value to avoid infinte loops.
2007-05-24 Wim Taymans <wim@fluendo.com> 2007-05-24 Wim Taymans <wim@fluendo.com>
Patch by: Peter Kjellerstedt <pkj at axis com> Patch by: Peter Kjellerstedt <pkj at axis com>

View file

@ -2906,7 +2906,7 @@ static gboolean
gst_rtspsrc_parse_methods (GstRTSPSrc * src, RTSPMessage * response) gst_rtspsrc_parse_methods (GstRTSPSrc * src, RTSPMessage * response)
{ {
RTSPHeaderField field; RTSPHeaderField field;
gchar *respoptions = NULL; gchar *respoptions;
gchar **options; gchar **options;
gint indx = 0; gint indx = 0;
gint i; gint i;
@ -2917,6 +2917,7 @@ gst_rtspsrc_parse_methods (GstRTSPSrc * src, RTSPMessage * response)
/* try the Allow header first */ /* try the Allow header first */
field = RTSP_HDR_ALLOW; field = RTSP_HDR_ALLOW;
while (TRUE) { while (TRUE) {
respoptions = NULL;
rtsp_message_get_header (response, field, &respoptions, indx); rtsp_message_get_header (response, field, &respoptions, indx);
if (indx == 0 && !respoptions) { if (indx == 0 && !respoptions) {
/* if no Allow header was found then try the Public header... */ /* if no Allow header was found then try the Public header... */