aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-11 23:57:08 +0200
committerMartin Storsjö <martin@martin.st>2012-10-12 18:16:57 +0300
commiteae35eadc0ae943598ed3f971245fe39a1cd213b (patch)
treebfef1f6c664e54a64884d2e5e367f2411d2b114c /libavformat
parent0bf511d579c7b21f1244eec688abf571ca1235bd (diff)
downloadffmpeg-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.c4
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') {