From 4ec4454ccf72ceca06393b4b3759e3412cf885da Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 13 Aug 2015 12:13:51 +0200 Subject: [PATCH] avformat/wavdec: Do not discard sample_count due to rounding Signed-off-by: Michael Niedermayer --- libavformat/wavdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }