# HG changeset patch # User banan # Date 1184784003 0 # Node ID 74680ec68fd164b359a02ecd09b1311e63fba197 # Parent bbb982818ce7c28507cce8d3ad100287030c02d3 Set the step index correctly for flash adpcm. Patch by Baptiste Coudurier. diff -r bbb982818ce7 -r 74680ec68fd1 adpcm.c --- a/adpcm.c Wed Jul 18 18:35:03 2007 +0000 +++ b/adpcm.c Wed Jul 18 18:40:03 2007 +0000 @@ -531,8 +531,9 @@ //Init the encoder state for(i=0; ichannels; i++){ + c->status[i].step_index = av_clip(c->status[i].step_index, 0, 63); // clip step so it fits 6 bits put_bits(&pb, 16, samples[i] & 0xFFFF); - put_bits(&pb, 6, c->status[i].step_index & 0x3F); + put_bits(&pb, 6, c->status[i].step_index); c->status[i].prev_sample = (signed short)samples[i]; }