From: Kostya Shishkov Date: Thu, 26 Mar 2020 14:11:58 +0000 (+0100) Subject: vmd: ignore empty frames X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=5961ae1d4cd4b34cab545ef5b769005b854a1768;p=nihav.git vmd: ignore empty frames --- diff --git a/nihav-game/src/codecs/vmd.rs b/nihav-game/src/codecs/vmd.rs index 3e002ea..21be388 100644 --- a/nihav-game/src/codecs/vmd.rs +++ b/nihav-game/src/codecs/vmd.rs @@ -180,6 +180,9 @@ impl VMDVideoDecoder { br.read_skip(1)?; let flags = br.read_byte()?; let has_pal = (flags & 0x02) != 0; + if (frame_x == 0xFFFF) && (frame_y == 0xFFFF) && (frame_l == 0xFFFF) && (frame_d == 0xFFFF) { + return Ok(false); + } validate!(frame_l >= frame_x && frame_d >= frame_y); validate!(frame_l < self.width && frame_d < self.height);