diff options
author | Peter Ross <pross@xvid.org> | 2013-12-21 19:42:23 +1100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-21 11:45:14 +0100 |
commit | 8baaa924bd42977c1f5c4aae0fe24985afb52a87 (patch) | |
tree | 83a2d51af22cbd84a1b255eb76ea2d56496f3747 /libavformat/wtvdec.c | |
parent | 70d6ce783cc508f99c011438f2927b1a074dea56 (diff) | |
download | ffmpeg-8baaa924bd42977c1f5c4aae0fe24985afb52a87.tar.gz |
wtvdec: when testing for truncated files, actually check the .wtv file size
Previously the demuxer was testing against avio_tell, and this would generate
many false warnings.
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r-- | libavformat/wtvdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 4dfe7010d1..48f51ad913 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -205,7 +205,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int return NULL; } - if ((int64_t)wf->sectors[wf->nb_sectors - 1] << WTV_SECTOR_BITS > avio_tell(s->pb)) + if ((int64_t)wf->sectors[wf->nb_sectors - 1] << WTV_SECTOR_BITS > avio_size(s->pb)) av_log(s, AV_LOG_WARNING, "truncated file\n"); /* check length */ |