ffmpeg | branch: release/2.4 | Michael Niedermayer <michae...@gmx.at> | Mon May 
 4 23:42:24 2015 +0200| [9f4979b24c9a455b1ef16ee97dfeb21e4cfde1ba] | committer: 
Michael Niedermayer

avformat/avidec: print a warning for negative sample_size

Signed-off-by: Michael Niedermayer <michae...@gmx.at>
(cherry picked from commit c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c)

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

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

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

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index d6dea6e..8c638de 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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to