]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
RTSP: only skip leading zeros if the next character is also zero (fixes stream ID... 413/head
authorwooyay <github@wooyay.me.uk>
Mon, 2 Jun 2014 10:02:52 +0000 (11:02 +0100)
committerwooyay <github@wooyay.me.uk>
Mon, 2 Jun 2014 10:02:52 +0000 (11:02 +0100)
src/rtsp.c

index 30420b7743a9dd0ac01a6bf880dde6c6a6e88e96..d7602630227afb32adabe1cdb7b22c5db7523a05 100644 (file)
@@ -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;