diff adpcm.c @ 7260:3ec34b551aae libavcodec

bitstream: move put_sbits() from flacenc.c to bitstream.h and use it throughout libavcodec.
author ramiro
date Sun, 13 Jul 2008 14:27:48 +0000
parents 9de4bc7d4938
children 85ab7655ad4d
line wrap: on
line diff
--- a/adpcm.c	Sun Jul 13 14:25:31 2008 +0000
+++ b/adpcm.c	Sun Jul 13 14:27:48 2008 +0000
@@ -563,7 +563,7 @@
         //Init the encoder state
         for(i=0; i<avctx->channels; 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_sbits(&pb, 16, samples[i]);
             put_bits(&pb, 6, c->status[i].step_index);
             c->status[i].prev_sample = (signed short)samples[i];
         }