Commit eae35ead authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

rtspdec: Fix use of uninitialized byte

ffurl_read_complete can return 0 as well as negative error codes.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 0bf511d5
...@@ -76,8 +76,8 @@ static inline int read_line(AVFormatContext *s, char *rbuf, const int rbufsize, ...@@ -76,8 +76,8 @@ static inline int read_line(AVFormatContext *s, char *rbuf, const int rbufsize,
do { do {
ret = ffurl_read_complete(rt->rtsp_hd, rbuf + idx, 1); ret = ffurl_read_complete(rt->rtsp_hd, rbuf + idx, 1);
if (ret < 0) if (ret <= 0)
return ret; return ret ? ret : AVERROR_EOF;
if (rbuf[idx] == '\r') { if (rbuf[idx] == '\r') {
/* Ignore */ /* Ignore */
} else if (rbuf[idx] == '\n') { } else if (rbuf[idx] == '\n') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment