mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
A method for re-using a bit_cursor_c object.
This commit is contained in:
parent
48cdb42fcb
commit
015299f67f
@ -31,11 +31,16 @@ private:
|
||||
bool out_of_data;
|
||||
|
||||
public:
|
||||
bit_cursor_c(const unsigned char *data, unsigned int len):
|
||||
end_of_data(data + len), byte_position(data), start_of_data(data),
|
||||
bits_valid(8), out_of_data(false) {
|
||||
if (byte_position >= end_of_data)
|
||||
out_of_data = true;
|
||||
bit_cursor_c(const unsigned char *data, unsigned int len) {
|
||||
init(data, len);
|
||||
}
|
||||
|
||||
void init(const unsigned char *data, unsigned int len) {
|
||||
end_of_data = data + len;
|
||||
byte_position = data;
|
||||
start_of_data = data;
|
||||
bits_valid = 8;
|
||||
out_of_data = byte_position >= end_of_data;
|
||||
}
|
||||
|
||||
bool eof() {
|
||||
|
Loading…
Reference in New Issue
Block a user