From 726973ae7a1a69bef41732a4b3202b1b60fab0ca Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 2 Apr 2019 13:47:18 +0200 Subject: [PATCH] bmv3: do not demux empty video frames --- nihav-game/src/demuxers/bmv.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.39.5