diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-10-02 09:41:57 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-11-01 15:35:46 +0100 |
commit | 857e391697287a97a810114fba0de52179e6c623 (patch) | |
tree | b7629f3b95d2fcb482ae41afd9d7613893b730ae | |
parent | 04aa2ffbcf706605499ebdffff1ab063e782d9f7 (diff) | |
download | ffmpeg-857e391697287a97a810114fba0de52179e6c623.tar.gz |
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)
-rw-r--r-- | libavformat/wtvdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 4cb3295464..9cedae1f8e 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; |