From 8be597d51e86856e32e45ad3b7a766299fef578f Mon Sep 17 00:00:00 2001
From: Nikolai Shostak <nikolai.shostak@vicuesoft.com>
Date: Thu, 29 Sep 2022 17:46:48 +0300
Subject: [PATCH] Add a check for ff_byte in Filler SEI

---
 source/Lib/DecoderLib/SEIread.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp
index f7e8ff361..fc97e39ba 100644
--- a/source/Lib/DecoderLib/SEIread.cpp
+++ b/source/Lib/DecoderLib/SEIread.cpp
@@ -546,10 +546,13 @@ void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType
 
 void SEIReader::xParseSEIFillerPayload(SEIFillerPayload &sei, uint32_t payloadSize, std::ostream *pDecodedMessageOutputStream)
 {
-  uint32_t val;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
   for (uint32_t i = 0; i < payloadSize; i++)
   {
+    uint32_t val;
     sei_read_code( nullptr, 8, val, "ff_byte");
+    CHECK(val != 0xff, "ff_byte shall be a byte having the value 0xFF");
   }
 }
 
-- 
GitLab