1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

get_bits: get_bits_long() support n=0 as the docs allow it

also the 0 case is indeed used in some code pathes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-06 22:25:04 +02:00
parent ac6659aff7
commit 094a82c7de

View File

@ -302,7 +302,9 @@ static inline void skip_bits1(GetBitContext *s)
*/ */
static inline unsigned int get_bits_long(GetBitContext *s, int n) static inline unsigned int get_bits_long(GetBitContext *s, int n)
{ {
if (n <= MIN_CACHE_BITS) if (!n) {
return 0;
} else if (n <= MIN_CACHE_BITS)
return get_bits(s, n); return get_bits(s, n);
else { else {
#ifdef BITSTREAM_READER_LE #ifdef BITSTREAM_READER_LE