Merge pull request #413 from wooyay/master

RTSP: only skip leading zeros if the next character is also zero
This commit is contained in:
perexg 2014-06-02 15:21:28 +02:00
commit 2f4944dc37

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;