Browse Source

wavpackenc: fix number of samples per block

Currently, the encoder will try to reduce it down to 150000, but the
decoder will complain starting at 131072 (WV_MAX_SAMPLES). Therefore,
change the loop limit.

Fixes ticket #3881.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4
Christophe Gisquet Michael Niedermayer 10 years ago
parent
commit
ddad093972
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/wavpackenc.c

+ 1
- 1
libavcodec/wavpackenc.c View File

@@ -135,7 +135,7 @@ static av_cold int wavpack_encode_init(AVCodecContext *avctx)
else
block_samples = avctx->sample_rate;

while (block_samples * avctx->channels > 150000)
while (block_samples * avctx->channels > WV_MAX_SAMPLES)
block_samples /= 2;

while (block_samples * avctx->channels < 40000)


Loading…
Cancel
Save