[FFmpeg-cvslog] smacker audio: sign-extend the initial 16-bit predicted value
Franz Brauße
git at videolan.org
Thu Jan 17 03:09:30 CET 2013
ffmpeg | branch: release/0.8 | Franz Brauße <dev at karlchenofhell.org> | Fri Mar 30 14:40:14 2012 -0400| [fb3189ce8b8a5ddc44b460f9fb1b5b4e8ddea2f2] | committer: Reinhard Tartler
smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265
Signed-off-by: Justin Ruggles <justin.ruggles at gmail.com>
(cherry picked from commit 12cbbbb4abda2de0ea123282ccf7ebee61517f7d)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb3189ce8b8a5ddc44b460f9fb1b5b4e8ddea2f2
---
libavcodec/smacker.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index eb4427c..ff2cdeb 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -644,7 +644,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
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++) {
More information about the ffmpeg-cvslog
mailing list