diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2008-07-19 22:01:46 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2008-07-19 22:01:46 +0000 |
commit | 4760aec6a09ceb1572e462941c016d699c1c5afc (patch) | |
tree | 01785d3edd8f180fef997950f3685d2752c2a73c | |
parent | 4f20b45fbeea62fa149c8bc471d75e42a1f7469c (diff) | |
download | ffmpeg-4760aec6a09ceb1572e462941c016d699c1c5afc.tar.gz |
read 'coupling in use' parameter from bitstream into decoder context first,
then copy to the local variable.
Originally committed as revision 14311 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/ac3dec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 8f62d7f5ca..d76597afc1 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -753,8 +753,8 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk) /* coupling strategy */ if (get_bits1(gbc)) { memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); - cpl_in_use = get_bits1(gbc); - if (cpl_in_use) { + s->cpl_in_use[blk] = get_bits1(gbc); + if (s->cpl_in_use[blk]) { /* coupling in use */ int cpl_begin_freq, cpl_end_freq; @@ -797,9 +797,9 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk) av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must be present in block 0\n"); return -1; } else { - cpl_in_use = s->cpl_in_use[blk-1]; + s->cpl_in_use[blk] = s->cpl_in_use[blk-1]; } - s->cpl_in_use[blk] = cpl_in_use; + cpl_in_use = s->cpl_in_use[blk]; /* coupling coordinates */ if (cpl_in_use) { |