From 12cbbbb4abda2de0ea123282ccf7ebee61517f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20Brau=C3=9Fe?= Date: Fri, 30 Mar 2012 14:40:14 -0400 Subject: [PATCH] smacker audio: sign-extend the initial 16-bit predicted value Fixes Bug #265 Signed-off-by: Justin Ruggles --- libavcodec/smacker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) {