aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranz Brauße <dev@karlchenofhell.org>2012-03-30 14:40:14 -0400
committerAnton Khirnov <anton@khirnov.net>2012-10-18 11:13:05 +0200
commit443f1463c0e1fff69b2c8fa7cc8ca324cdfbd4c5 (patch)
treef5eef01d468955e2355e69ff743109e72030bcde
parentbe209bdabb11c59de17220bdbf0bf9c9f7cc16f5 (diff)
downloadffmpeg-443f1463c0e1fff69b2c8fa7cc8ca324cdfbd4c5.tar.gz
smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265 Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com> (cherry picked from commit 12cbbbb4abda2de0ea123282ccf7ebee61517f7d) Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/smacker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 62e6689c37..3928d8f569 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -662,7 +662,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++) {