diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-11 23:57:08 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-10-12 18:16:57 +0300 |
commit | eae35eadc0ae943598ed3f971245fe39a1cd213b (patch) | |
tree | bfef1f6c664e54a64884d2e5e367f2411d2b114c /libavformat | |
parent | 0bf511d579c7b21f1244eec688abf571ca1235bd (diff) | |
download | ffmpeg-eae35eadc0ae943598ed3f971245fe39a1cd213b.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtspdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 7476c45ba8..d46f1a4872 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -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') { |