diff adpcm.c @ 5501:a0dcb5a51409 libavcodec

Don't encode the first sample twice.
author banan
date Mon, 06 Aug 2007 19:49:18 +0000
parents 8b0dc2ce135c
children c2ab2ac31edb
line wrap: on
line diff
--- 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; i<avctx->frame_size; i++) {
+        for (i=1; i<avctx->frame_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);