Commit 5f1c3c78 authored by Michael Niedermayer's avatar Michael Niedermayer

get_bits_long: fix variable type

This fixes a theoretical signed overflow
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 01aa664f
......@@ -306,10 +306,10 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n)
return get_bits(s, n);
else {
#ifdef BITSTREAM_READER_LE
int ret = get_bits(s, 16);
unsigned ret = get_bits(s, 16);
return ret | (get_bits(s, n-16) << 16);
#else
int ret = get_bits(s, 16) << (n-16);
unsigned ret = get_bits(s, 16) << (n-16);
return ret | get_bits(s, n-16);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment