OSDN Git Service

new dba values requires running last 2 bit allocation stages
authorJustin Ruggles <justin.ruggles@gmail.com>
Sat, 31 May 2008 19:56:54 +0000 (19:56 +0000)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sat, 31 May 2008 19:56:54 +0000 (19:56 +0000)
Originally committed as revision 13584 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ac3dec.c

index 93d1d18..ada77d8 100644 (file)
@@ -1005,6 +1005,9 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
                     s->dba_lengths[ch][seg] = get_bits(gbc, 4);
                     s->dba_values[ch][seg] = get_bits(gbc, 3);
                 }
+                /* run last 2 bit allocation stages if new dba values */
+                bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2);
+
             }
         }
     } else if(blk == 0) {