lavc: Add get_bitsz()

get_bit variant supporting 0-bits reads.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Andreas Cadhalpun 2016-01-11 21:05:55 +01:00 committed by Luca Barbato
parent 81737f42c2
commit 62825236db
2 changed files with 8 additions and 7 deletions

View file

@ -249,6 +249,14 @@ static inline unsigned int get_bits(GetBitContext *s, int n)
return tmp;
}
/**
* Read 0-25 bits.
*/
static av_always_inline int get_bitsz(GetBitContext *s, int n)
{
return n ? get_bits(s, n) : 0;
}
/**
* Show 1-25 bits.
*/