From 00a254b7fe97eabedd58d5ea205e8a3fb8c73e80 Mon Sep 17 00:00:00 2001 From: Benjamin Larsson Date: Mon, 6 Aug 2007 19:49:18 +0000 Subject: [PATCH] Don't encode the first sample twice. Originally committed as revision 9962 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/adpcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 1461005376..f022e852f4 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -537,7 +537,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, 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);