diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-04-02 13:47:18 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-04-02 13:47:18 +0200 |
commit | 726973ae7a1a69bef41732a4b3202b1b60fab0ca (patch) | |
tree | fdbd24e37c3ab537f5375fb71ba6dfde14483295 | |
parent | ecda1cc1266117b3bb8669b06185d2e15a265ebe (diff) | |
download | nihav-726973ae7a1a69bef41732a4b3202b1b60fab0ca.tar.gz |
bmv3: do not demux empty video frames
-rw-r--r-- | nihav-game/src/demuxers/bmv.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nihav-game/src/demuxers/bmv.rs b/nihav-game/src/demuxers/bmv.rs index 7553a94..ea06d7f 100644 --- a/nihav-game/src/demuxers/bmv.rs +++ b/nihav-game/src/demuxers/bmv.rs @@ -193,6 +193,13 @@ impl<'a> DemuxCore<'a> for BMV3Demuxer<'a> { } else { asize = 0; } + if size == asize { + if self.pkt_buf.len() > 0 { + return Ok(self.pkt_buf.pop().unwrap()); + } else { + continue; + } + } let mut buf: Vec<u8> = Vec::with_capacity(size - asize + 1); buf.resize(size - asize + 1, 0); buf[0] = ctype; |