Commit c7369f3a authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/avidec: print a warning for negative sample_size

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ca234639
...@@ -693,6 +693,8 @@ static int avi_read_header(AVFormatContext *s) ...@@ -693,6 +693,8 @@ static int avi_read_header(AVFormatContext *s)
default: default:
av_log(s, AV_LOG_INFO, "unknown stream type %X\n", tag1); 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); ast->sample_size = FFMAX(ast->sample_size, 0);
if (ast->sample_size == 0) { if (ast->sample_size == 0) {
st->duration = st->nb_frames; st->duration = st->nb_frames;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment