Commit 836fc777 authored by Reimar Döffinger's avatar Reimar Döffinger

Move variable declaration to block where it is used and simplify code.

Avoids a (incorrect) "possibly used uninitialized" warning, no measurable
speed difference.

Originally committed as revision 21518 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent dd0cd3d2
......@@ -192,7 +192,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx,
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 @@ static int mpc7_decode_frame(AVCodecContext * avctx,
/* 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;
}
......
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