git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0bf511d
)
rtspdec: Fix use of uninitialized byte
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 11 Oct 2012 21:57:08 +0000
(23:57 +0200)
committer
Martin Storsjö
<martin@martin.st>
Fri, 12 Oct 2012 15:16:57 +0000
(18:16 +0300)
ffurl_read_complete can return 0 as well as negative error codes.
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtspdec.c
patch
|
blob
|
history
diff --git
a/libavformat/rtspdec.c
b/libavformat/rtspdec.c
index
7476c45
..
d46f1a4
100644
(file)
--- 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);
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') {
if (rbuf[idx] == '\r') {
/* Ignore */
} else if (rbuf[idx] == '\n') {