[FFmpeg-cvslog] avformat/avidec: print a warning for negative sample_size

Michael Niedermayer git at videolan.org
Tue May 5 00:22:29 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon May  4 23:42:24 2015 +0200| [c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c] | committer: Michael Niedermayer

avformat/avidec: print a warning for negative sample_size

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c
---

 libavformat/avidec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 0668b17..ab9d53e 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -693,6 +693,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