diff --git a/src/rbsp.rs b/src/rbsp.rs index 074d9a1..e3044fd 100644 --- a/src/rbsp.rs +++ b/src/rbsp.rs @@ -274,6 +274,15 @@ impl BitReader { pub fn reader(&mut self) -> Option<&mut R> { self.reader.reader() } + + /// Unwraps internal reader and disposes of BitReader. + /// + /// # Warning + /// + /// Any unread partial bits are discarded. + pub fn into_reader(self) -> R { + self.reader.into_reader() + } } impl BitRead for BitReader {