diff options
author | Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> | 2015-04-22 17:03:41 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-05-05 17:10:52 +0300 |
commit | 60f1cc4a1ffcbf24acbb543988ceeaec76b70818 (patch) | |
tree | cb901b280378c41c2f3c89311ef422b015952edd | |
parent | 94bb1ce882a12b6d7a1fa32715a68121b39ee838 (diff) |
alsdec: only adapt order for positive max_order
For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)
CC: libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavcodec/alsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index a5452c377d..1ade656118 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -663,7 +663,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) if (!sconf->rlslms) { - if (sconf->adapt_order) { + if (sconf->adapt_order && sconf->max_order) { int opt_order_length = av_ceil_log2(av_clip((bd->block_length >> 3) - 1, 2, sconf->max_order + 1)); *bd->opt_order = get_bits(gb, opt_order_length); |