# HG changeset patch # User banan # Date 1186429758 0 # Node ID a0dcb5a514097b44c15447eaf55af386532ed774 # Parent 8b0dc2ce135c4c37fe85787b94690defb8689227 Don't encode the first sample twice. diff -r 8b0dc2ce135c -r a0dcb5a51409 adpcm.c --- a/adpcm.c Mon Aug 06 08:42:05 2007 +0000 +++ b/adpcm.c Mon Aug 06 19:49:18 2007 +0000 @@ -537,7 +537,7 @@ c->status[i].prev_sample = (signed short)samples[i]; } - for (i=0; iframe_size; i++) { + for (i=1; iframe_size; i++) { put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[0], samples[avctx->channels*i]) & 0xF); if (avctx->channels == 2) put_bits(&pb, 4, adpcm_ima_compress_sample(&c->status[1], samples[2*i+1]) & 0xF);