提交 62825236 编写于 作者: A Andreas Cadhalpun 提交者: Luca Barbato

lavc: Add get_bitsz()

get_bit variant supporting 0-bits reads.
Signed-off-by: NLuca Barbato <lu_zero@gentoo.org>
上级 81737f42
......@@ -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.
*/
......
......@@ -795,13 +795,6 @@ static void exponents_from_scale_factors(MPADecodeContext *s, GranuleDef *g,
}
}
/* handle n = 0 too */
static inline int get_bitsz(GetBitContext *s, int n)
{
return n ? get_bits(s, n) : 0;
}
static void switch_buffer(MPADecodeContext *s, int *pos, int *end_pos,
int *end_pos2)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册