[FFmpeg-cvslog] alsdec: only adapt order for positive max_order

Andreas Cadhalpun git at videolan.org
Wed May 6 17:26:15 CEST 2015


ffmpeg | branch: release/2.2 | Andreas Cadhalpun <andreas.cadhalpun at googlemail.com> | Wed Apr 22 16:03:41 2015 +0200| [e93c46b3ccc1f30cd14bac6f3e4f6e4a831559c1] | committer: Michael Niedermayer

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 at googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 58d605ee9b3277289278dc40e022311f8e083833)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e93c46b3ccc1f30cd14bac6f3e4f6e4a831559c1
---

 libavcodec/alsdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 1cd55ea..b5e748d 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -680,7 +680,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);



More information about the ffmpeg-cvslog mailing list