simplify
authorJustin Ruggles <justin.ruggles@gmail.com>
Sat, 31 May 2008 22:12:01 +0000 (22:12 +0000)
committerJustin Ruggles <justin.ruggles@gmail.com>
Sat, 31 May 2008 22:12:01 +0000 (22:12 +0000)
Originally committed as revision 13589 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ac3dec.c

index a7c5fa4be29e000a6ebe8656bf757d6e9bc2f0ed..7052fab35e9bb6d5c787d1d27fa4d615c08a70ca 100644 (file)
@@ -903,10 +903,7 @@ static int ac3_parse_audio_block(AC3DecodeContext *s, int blk)
     s->exp_strategy[CPL_CH] = EXP_REUSE;
     s->exp_strategy[s->lfe_ch] = EXP_REUSE;
     for (ch = !s->cpl_in_use; ch <= s->channels; ch++) {
-        if(ch == s->lfe_ch)
-            s->exp_strategy[ch] = get_bits(gbc, 1);
-        else
-            s->exp_strategy[ch] = get_bits(gbc, 2);
+        s->exp_strategy[ch] = get_bits(gbc, 2 - (ch == s->lfe_ch));
         if(s->exp_strategy[ch] != EXP_REUSE)
             bit_alloc_stages[ch] = 3;
     }