Commit ddad0939 authored by Christophe Gisquet's avatar Christophe Gisquet Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1b5ec6a0
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment