diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-07 10:12:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-07 10:58:10 +0200 |
commit | e3b7079ddf8322577e1d1f9ef762e96c2b0ad923 (patch) | |
tree | b66152119c82368e0593f25ca49daacb6495ea6a /libavcodec/adpcmenc.c | |
parent | fe5b7db07ac3b5de87cfcb6536146f2236d67164 (diff) |
adpcmenc: fix encoded s_0 value.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r-- | libavcodec/adpcmenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index e46e6f240b..118a9840d1 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -571,7 +571,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, init_put_bits(&pb, dst, pkt_size * 8); for (ch = 0; ch < avctx->channels; ch++) { - put_bits(&pb, 9, (c->status[ch].prev_sample + 0x10000) >> 7); + put_bits(&pb, 9, (c->status[ch].prev_sample & 0xFFFF) >> 7); put_bits(&pb, 7, c->status[ch].step_index); if (avctx->trellis > 0) { uint8_t buf[64]; |