diff options
author | Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> | 2015-04-22 16:03:41 +0200 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-05-14 19:07:13 +0200 |
commit | 01291b4e2f4f798fe1ab60370ebfd7d7b0731aca (patch) | |
tree | 2418d4feb0162034eae1c5dc03aa1e97b4c7196e | |
parent | 787e094ed0b04bfd5f32ccfe0b6c2fc8e89dace4 (diff) | |
download | ffmpeg-01291b4e2f4f798fe1ab60370ebfd7d7b0731aca.tar.gz |
alsdec: only adapt order for positive max_order
For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 58d605ee9b3277289278dc40e022311f8e083833)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-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 62c91ae78b..d9fcb1a0bc 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -682,7 +682,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); |