aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-mpeg/src/codecs/mpegaudio/mod.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2021-11-19 15:45:31 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2021-11-19 15:45:31 +0100
commit7f754c49a843d9b63885a1fa7e06f4d2cf6ccc5f (patch)
treee8678169eeca4a0788d671ec744effb0e6647956 /nihav-mpeg/src/codecs/mpegaudio/mod.rs
parent6a97ae3af1e98b2d7b064c8870aaccae44a47c7d (diff)
downloadnihav-7f754c49a843d9b63885a1fa7e06f4d2cf6ccc5f.tar.gz
add bytes_left() to NAPacketiser so its internal buffer size can be monitored
Diffstat (limited to 'nihav-mpeg/src/codecs/mpegaudio/mod.rs')
-rw-r--r--nihav-mpeg/src/codecs/mpegaudio/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/nihav-mpeg/src/codecs/mpegaudio/mod.rs b/nihav-mpeg/src/codecs/mpegaudio/mod.rs
index 6c908d8..e9400f6 100644
--- a/nihav-mpeg/src/codecs/mpegaudio/mod.rs
+++ b/nihav-mpeg/src/codecs/mpegaudio/mod.rs
@@ -426,6 +426,7 @@ impl NAPacketiser for MPAPacketiser {
fn reset(&mut self) {
self.buf.clear();
}
+ fn bytes_left(&self) -> usize { self.buf.len() }
}
pub fn get_packetiser() -> Box<dyn NAPacketiser + Send> {