# HG changeset patch # User reimar # Date 1264712510 0 # Node ID 9db9a81cc22052dbbb20b68b37acaddbebefd239 # Parent ec682347e19e06131d2704e825faaf8c65d7ceec Move variable declaration to block where it is used and simplify code. Avoids a (incorrect) "possibly used uninitialized" warning, no measurable speed difference. diff -r ec682347e19e -r 9db9a81cc220 mpc7.c --- a/mpc7.c Thu Jan 28 20:57:29 2010 +0000 +++ b/mpc7.c Thu Jan 28 21:01:50 2010 +0000 @@ -192,7 +192,7 @@ MPCContext *c = avctx->priv_data; GetBitContext gb; uint8_t *bits; - int i, ch, t; + int i, ch; int mb = -1; Band *bands = c->bands; int off; @@ -211,8 +211,9 @@ /* read subband indexes */ for(i = 0; i <= c->maxbands; i++){ for(ch = 0; ch < 2; ch++){ + int t = 4; if(i) t = get_vlc2(&gb, hdr_vlc.table, MPC7_HDR_BITS, 1) - 5; - if(!i || (t == 4)) bands[i].res[ch] = get_bits(&gb, 4); + if(t == 4) bands[i].res[ch] = get_bits(&gb, 4); else bands[i].res[ch] = bands[i-1].res[ch] + t; }