mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-01 14:06:45 +02:00
get_bits: return pointer to buffer that is the result of the alignment.
This allows more transparent mixing of get_bits and whole-byte access without having to touch get_bits internals. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
5e74a2b685
commit
fd6a021d8e
@ -415,11 +415,12 @@ static inline int init_get_bits8(GetBitContext *s, const uint8_t *buffer,
|
||||
return init_get_bits(s, buffer, byte_size * 8);
|
||||
}
|
||||
|
||||
static inline void align_get_bits(GetBitContext *s)
|
||||
static inline const uint8_t *align_get_bits(GetBitContext *s)
|
||||
{
|
||||
int n = -get_bits_count(s) & 7;
|
||||
if (n)
|
||||
skip_bits(s, n);
|
||||
return s->buffer + (s->index >> 3);
|
||||
}
|
||||
|
||||
#define init_vlc(vlc, nb_bits, nb_codes, \
|
||||
|
Loading…
Reference in New Issue
Block a user