[FFmpeg-cvslog] avformat/avidec: print a warning for negative sample_size
Michael Niedermayer
git at videolan.org
Mon Jun 1 13:11:23 CEST 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Mon May 4 23:42:24 2015 +0200| [7666ecbbcbd295ab23a5b43293ba59c7ae1cfcab] | committer: Michael Niedermayer
avformat/avidec: print a warning for negative sample_size
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7666ecbbcbd295ab23a5b43293ba59c7ae1cfcab
---
libavformat/avidec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index cfcd85b..9eb48f2 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -604,6 +604,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;
More information about the ffmpeg-cvslog
mailing list