Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-08-22 13:31:42 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-08-22 14:18:08 +0400
commitddad09397247f523d7cc66c7f4ed7ea6894cc40e (patch)
tree0eba352ab0e867927f513908638c7379d080ca77 /libavcodec/wavpackenc.c
parent1b5ec6a0c3309e7a051751b2f989ffa068516d93 (diff)
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>
Diffstat (limited to 'libavcodec/wavpackenc.c')
-rw-r--r--libavcodec/wavpackenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index 3631a0819f..169836a754 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -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)