[FFmpeg-cvslog] Stop demuxing wtv on eof.

Carl Eugen Hoyos git at videolan.org
Sat Nov 1 15:44:53 CET 2014


ffmpeg | branch: release/2.4 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Oct  2 09:41:57 2014 +0200| [857e391697287a97a810114fba0de52179e6c623] | committer: Carl Eugen Hoyos

Stop demuxing wtv on eof.

Fixes ticket #3991.
Fixes ticket #3995.
Fixes ticket #3997.

Reviewed-by: Peter Ross
Reviewed-by: Paul B Mahol
(cherry picked from commit 6efe4137ce39fef35e3e7f274160958acdac7581)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=857e391697287a97a810114fba0de52179e6c623
---

 libavformat/wtvdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 4cb3295..9cedae1 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -789,6 +789,8 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
         len = avio_rl32(pb);
         if (len < 32) {
             int ret;
+            if (avio_feof(pb))
+                return AVERROR_EOF;
             av_log(s, AV_LOG_WARNING, "encountered broken chunk\n");
             if ((ret = recover(wtv, avio_tell(pb) - 20)) < 0)
                 return ret;



More information about the ffmpeg-cvslog mailing list