summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-13 12:13:51 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-13 12:38:20 +0200
commit4ec4454ccf72ceca06393b4b3759e3412cf885da (patch)
tree386992e6468bd0de6f9f073a5b673519384707e1 /libavformat
parent1bbb5ea10d9e5e8c0f6e88a11c41659e69409f7d (diff)
avformat/wavdec: Do not discard sample_count due to rounding
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/wavdec.c2
1 files changed, 1 insertions, 1 deletions
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;
}