diff options
-rw-r--r-- | common/bitstream.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/bitstream.h b/common/bitstream.h index 0fe16b5beb..b789f2ac8d 100644 --- a/common/bitstream.h +++ b/common/bitstream.h @@ -52,6 +52,9 @@ public: /** Skip the specified amount of bits. */ virtual void skip(uint32 n) = 0; + /** Skip the bits to closest data value border. */ + virtual void align() = 0; + /** Read a bit from the bit stream. */ virtual uint32 getBit() = 0; @@ -276,6 +279,12 @@ public: getBit(); } + /** Skip the bits to closest data value border. */ + void align() { + while (_inValue) + getBit(); + } + /** Return the stream position in bits. */ uint32 pos() const { if (_stream->pos() == 0) |