avformat/wavdec: Do not discard sample_count due to rounding

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/146/head
Michael Niedermayer 9 years ago
parent 1bbb5ea10d
commit 4ec4454ccf
  1. 2
      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;
}

Loading…
Cancel
Save