From 9eb5d31a68bbf41ebd4144cf71f762c26f558438 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Thu, 21 Apr 2011 12:57:40 +0300 Subject: stagefright aacenc: Mark codeWord as UWord16 Without this, the codeword 0xffff will be expanded to 0xffffffff when passed as a Word32 parameter. All code words set into this variable are UWord16 initially. When it was expanded to 0xffffffff, it could accidentally overwrite earlier cached bits in the bitstream writer. Change-Id: Id91a2b8a4e934876d9cb39eaeeee323202ec8e40 --- media/libstagefright/codecs/aacenc/src/bit_cnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media') diff --git a/media/libstagefright/codecs/aacenc/src/bit_cnt.c b/media/libstagefright/codecs/aacenc/src/bit_cnt.c index 510015a..9fe511c 100644 --- a/media/libstagefright/codecs/aacenc/src/bit_cnt.c +++ b/media/libstagefright/codecs/aacenc/src/bit_cnt.c @@ -496,7 +496,7 @@ Word16 codeValues(Word16 *values, Word16 width, Word16 codeBook, HANDLE_BIT_BUF { Word32 i, t0, t1, t2, t3, t00, t01; - Word16 codeWord, codeLength; + UWord16 codeWord, codeLength; Word16 sign, signLength; -- cgit v1.1