mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/get_bits: add skip_1stop_8data_bits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7f019129e1
commit
44e8e82d34
@ -585,6 +585,20 @@ static inline int get_bits_left(GetBitContext *gb)
|
|||||||
return gb->size_in_bits - get_bits_count(gb);
|
return gb->size_in_bits - get_bits_count(gb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int skip_1stop_8data_bits(GetBitContext *gb)
|
||||||
|
{
|
||||||
|
if (get_bits_left(gb) <= 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
|
while (get_bits1(gb)) {
|
||||||
|
skip_bits(gb, 8);
|
||||||
|
if (get_bits_left(gb) <= 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//#define TRACE
|
//#define TRACE
|
||||||
|
|
||||||
#ifdef TRACE
|
#ifdef TRACE
|
||||||
|
Loading…
Reference in New Issue
Block a user