From 73af0a3069671eeb8e531f51174978e6f4ee4a85 Mon Sep 17 00:00:00 2001 From: falsycat Date: Thu, 8 Sep 2022 11:42:51 +0900 Subject: [PATCH] fix stego_fprob to skip empty frame --- conv/stego_fprob.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conv/stego_fprob.cc b/conv/stego_fprob.cc index ef81a8a..45815cd 100644 --- a/conv/stego_fprob.cc +++ b/conv/stego_fprob.cc @@ -289,8 +289,11 @@ static void Exec() { const auto ret = dec->DecodeFrameNoDelay(&nal[i], sz, yuv, &frame); Enforce(ret == 0, "frame decode failure"); + i += sz; Frame cf = {yuv, frame}; + if (cf.w == 0 || cf.h == 0) continue; + const auto utf = fidx%ut; if (utf > 0) { EachFrame(utf, cf, pf); @@ -298,7 +301,6 @@ static void Exec() { pf = std::move(cf); ++fidx; - i += sz; } } }