mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-29 22:40:23 +00:00
rtspdec: Fix use of uninitialized byte
ffurl_read_complete can return 0 as well as negative error codes. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
0bf511d579
commit
eae35eadc0
@ -76,8 +76,8 @@ static inline int read_line(AVFormatContext *s, char *rbuf, const int rbufsize,
|
||||
|
||||
do {
|
||||
ret = ffurl_read_complete(rt->rtsp_hd, rbuf + idx, 1);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (ret <= 0)
|
||||
return ret ? ret : AVERROR_EOF;
|
||||
if (rbuf[idx] == '\r') {
|
||||
/* Ignore */
|
||||
} else if (rbuf[idx] == '\n') {
|
||||
|
Loading…
Reference in New Issue
Block a user