diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 8b48fc864d..85e7da6788 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -435,7 +435,7 @@ break_loop: } if ( data_size > 0 && sample_count && st->codec->channels - && (data_size << 3) / sample_count / st->codec->channels > st->codec->bits_per_coded_sample) { + && (data_size << 3) / sample_count / st->codec->channels > st->codec->bits_per_coded_sample + 1) { av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count); sample_count = 0; }