diff options
author | Benjamin Larsson <banan@ludd.ltu.se> | 2007-08-06 19:49:18 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2007-08-06 19:49:18 +0000 |
commit | 00a254b7fe97eabedd58d5ea205e8a3fb8c73e80 (patch) | |
tree | 442430d442b1c262e83b958f5b6b867bcdc6164b /libavcodec | |
parent | d65fb393c9d43a2cc06053c1e8166f285ac8d314 (diff) | |
download | ffmpeg-00a254b7fe97eabedd58d5ea205e8a3fb8c73e80.tar.gz |
Don't encode the first sample twice.
Originally committed as revision 9962 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/adpcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; 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); |