summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-30 02:37:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-30 02:37:40 +0200
commit5f1c3c785c786f3c78c350d4503fcfd794fa3c64 (patch)
tree80a6bd2174fab1b1431852f38b0fa0b5a0e5f618 /libavcodec
parent01aa664f215345cddd57a3dcea2740ac0d0daf5f (diff)
get_bits_long: fix variable type
This fixes a theoretical signed overflow Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/get_bits.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index d926f57575..0aabca23cc 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -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
}