RTSP: only skip leading zeros if the next character is also zero (fixes stream ID of 0)

This commit is contained in:
wooyay 2014-06-02 11:02:52 +01:00
parent e35085a2b6
commit 4e23bffa42

View 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;