From 4e23bffa42f9cbc32f515bded5ff10d06179213e Mon Sep 17 00:00:00 2001 From: wooyay Date: Mon, 2 Jun 2014 11:02:52 +0100 Subject: [PATCH] RTSP: only skip leading zeros if the next character is also zero (fixes stream ID of 0) --- src/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtsp.c b/src/rtsp.c index 30420b77..d7602630 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;