diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2007-07-14 15:59:25 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2007-07-14 15:59:25 +0000 |
commit | 67414da7f7d4960b6dad1a720390b4b007014afc (patch) | |
tree | 63dbacbc016344d9cc7257459f5ada2e7a723dd8 | |
parent | 45b0ed13a894a564cbca6e018fc89e4fee4af98e (diff) | |
download | ffmpeg-67414da7f7d4960b6dad1a720390b4b007014afc.tar.gz |
AC-3 decoder, soc revision 52, Aug 16 22:45:07 2006 UTC by cloud9
Reset the blksw and dithflag to 0 at the begining of each block.
Otherwise blockswitching propagates over multiple frames even if
block switching is not enabled for that frame.
Also reuse rematflg.
Originally committed as revision 9660 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/ac3dec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 66d415dff9..6ed318f61d 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1632,9 +1632,11 @@ static int ac3_parse_audio_block(AC3DecodeContext * ctx) for (i = 0; i < 5; i++) ctx->chcoeffs[i] = 2.0; + ctx->blksw = 0; for (i = 0; i < nfchans; i++) /*block switch flag */ ctx->blksw |= get_bits1(gb) << i; + ctx->dithflag = 0; for (i = 0; i < nfchans; i++) /* dithering flag */ ctx->dithflag |= get_bits1(gb) << i; @@ -1886,7 +1888,7 @@ static int ac3_parse_audio_block(AC3DecodeContext * ctx) dump_floats("channel transform coefficients", 10, ctx->transform_coeffs[i + 1], BLOCK_SIZE);*/ /* recover coefficients if rematrixing is in use */ - if (ctx->rematstr) + if (ctx->rematflg) do_rematrixing(ctx); do_imdct(ctx); |