[FFmpeg-devel] [PATCH 5/5] wtvdec: warn about truncated files
Paul B Mahol
onemda at gmail.com
Sun Dec 30 13:44:07 CET 2012
On 12/30/12, Peter Ross <pross at xvid.org> wrote:
> ---
> libavformat/wtvdec.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
> index 88daa09..3121269 100644
> --- a/libavformat/wtvdec.c
> +++ b/libavformat/wtvdec.c
> @@ -200,6 +200,9 @@ static AVIOContext * wtvfile_open_sector(int
> first_sector, uint64_t length, int
> return NULL;
> }
>
> + if (wf->sectors[wf->nb_sectors - 1] << WTV_SECTOR_BITS >
> avio_tell(s->pb))
wf->nb_sectors cant be 0?
> + av_log(s, AV_LOG_WARNING, "truncated file\n");
> +
> /* check length */
> length &= 0xFFFFFFFFFFFF;
> if (length > ((int64_t)wf->nb_sectors << wf->sector_bits)) {
> --
> 1.8.0
>
> -- Peter
> (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
>
More information about the ffmpeg-devel
mailing list