changeset 5677:b031d95d8fae libavcodec

fix decoding of DolbyNet AC3
author jbr
date Sat, 15 Sep 2007 00:00:57 +0000
parents 71dc0d839b28
children 53c43e7156bc
files ac3dec.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Fri Sep 14 06:01:29 2007 +0000
+++ b/ac3dec.c	Sat Sep 15 00:00:57 2007 +0000
@@ -947,8 +947,8 @@
 
     /* bit allocation information */
     if (get_bits1(gb)) {
-        ctx->bit_alloc_params.sdecay = ff_sdecaytab[get_bits(gb, 2)];
-        ctx->bit_alloc_params.fdecay = ff_fdecaytab[get_bits(gb, 2)];
+        ctx->bit_alloc_params.sdecay = ff_sdecaytab[get_bits(gb, 2)] >> ctx->bit_alloc_params.halfratecod;
+        ctx->bit_alloc_params.fdecay = ff_fdecaytab[get_bits(gb, 2)] >> ctx->bit_alloc_params.halfratecod;
         ctx->bit_alloc_params.sgain  = ff_sgaintab[get_bits(gb, 2)];
         ctx->bit_alloc_params.dbknee = ff_dbkneetab[get_bits(gb, 2)];
         ctx->bit_alloc_params.floor  = ff_floortab[get_bits(gb, 3)];