From: wooyay Date: Mon, 2 Jun 2014 10:02:52 +0000 (+0100) Subject: RTSP: only skip leading zeros if the next character is also zero (fixes stream ID... X-Git-Tag: v4.1~2010^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e23bffa42f9cbc32f515bded5ff10d06179213e;p=thirdparty%2Ftvheadend.git RTSP: only skip leading zeros if the next character is also zero (fixes stream ID of 0) --- diff --git a/src/rtsp.c b/src/rtsp.c index 30420b774..d76026302 100644 --- a/src/rtsp.c +++ b/src/rtsp.c @@ -119,7 +119,7 @@ rtsp_setup_decode( http_client_t *hc, int satip ) if (p == NULL) return -EIO; /* zero is valid stream id per specification */ - while (*p && (*p == '0' || *p < ' ')) + while (*p && ((*p == '0' && *(p + 1) == '0') || *p < ' ')) p++; if (p[0] == '0' && p[1] == '\0') { hc->hc_rtsp_stream_id = 0;