diff options
author | Franz Brauße <dev@karlchenofhell.org> | 2012-03-30 14:40:14 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-03-30 14:44:11 -0400 |
commit | 12cbbbb4abda2de0ea123282ccf7ebee61517f7d (patch) | |
tree | 6c13c6cadd26dfb0428d50f76645489a187a541e /libavcodec/smacker.c | |
parent | b691fd7a4dfca766075c022922a75cdbca4e6d92 (diff) | |
download | ffmpeg-12cbbbb4abda2de0ea123282ccf7ebee61517f7d.tar.gz |
smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r-- | libavcodec/smacker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index d4253873c5..46027306a8 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -655,7 +655,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, } if(bits) { //decode 16-bit data for(i = stereo; i >= 0; i--) - pred[i] = av_bswap16(get_bits(&gb, 16)); + pred[i] = sign_extend(av_bswap16(get_bits(&gb, 16)), 16); for(i = 0; i <= stereo; i++) *samples++ = pred[i]; for(; i < unp_size / 2; i++) { |