[FFmpeg-devel] [PATCH] DV demuxer: Stricter check for avio_read result.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Mar 6 21:35:58 CET 2012


Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavformat/dv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/dv.c b/libavformat/dv.c
index 1200dda..81a0e47 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -495,7 +495,7 @@ static int dv_read_header(AVFormatContext *s)
     }
     AV_WB32(c->buf, state);
 
-    if (avio_read(s->pb, c->buf + 4, DV_PROFILE_BYTES - 4) <= 0 ||
+    if (avio_read(s->pb, c->buf + 4, DV_PROFILE_BYTES - 4) != DV_PROFILE_BYTES - 4 ||
         avio_seek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0)
         return AVERROR(EIO);
 
-- 
1.7.9.1



More information about the ffmpeg-devel mailing list