Commit 49f3673d authored by jbr's avatar jbr

read 'coupling in use' parameter from bitstream into decoder context first,

then copy to the local variable.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14311 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7820ce84
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment