diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-04 23:42:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-19 21:24:27 +0200 |
commit | 9f4979b24c9a455b1ef16ee97dfeb21e4cfde1ba (patch) | |
tree | 4ddd34f9f8db930cabdbaec2e9b08c8b4c9b266b /libavformat | |
parent | df0003030a979d7790180b3aa7e265e6f2b2fb1c (diff) | |
download | ffmpeg-9f4979b24c9a455b1ef16ee97dfeb21e4cfde1ba.tar.gz |
avformat/avidec: print a warning for negative sample_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avidec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index d6dea6e9bf..8c638de7b5 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -685,6 +685,8 @@ static int avi_read_header(AVFormatContext *s) default: av_log(s, AV_LOG_INFO, "unknown stream type %X\n", tag1); } + if (ast->sample_size < 0) + av_log(s, AV_LOG_WARNING, "sample size %d is invalid\n", ast->sample_size); ast->sample_size = FFMAX(ast->sample_size, 0); if (ast->sample_size == 0) { st->duration = st->nb_frames; |