From: Kostya Shishkov Date: Tue, 2 Apr 2019 11:47:18 +0000 (+0200) Subject: bmv3: do not demux empty video frames X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=726973ae7a1a69bef41732a4b3202b1b60fab0ca;p=nihav.git bmv3: do not demux empty video frames --- 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 = Vec::with_capacity(size - asize + 1); buf.resize(size - asize + 1, 0); buf[0] = ctype;