From 5961ae1d4cd4b34cab545ef5b769005b854a1768 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 26 Mar 2020 15:11:58 +0100 Subject: [PATCH] vmd: ignore empty frames --- nihav-game/src/codecs/vmd.rs | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5