From 944e9f7b65bf4066cf22711d76efe81611238987 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sat, 13 Jan 2024 15:44:27 +0100 Subject: [PATCH] pass the size we are checking for validity --- matroska/KaxBlock.h | 5 ++++- src/KaxBlock.cpp | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/matroska/KaxBlock.h b/matroska/KaxBlock.h index fdf02894..c05f93d2 100644 --- a/matroska/KaxBlock.h +++ b/matroska/KaxBlock.h @@ -185,7 +185,10 @@ class MATROSKA_DLL_API KaxInternalBlock : public libebml::EbmlBinary { {} KaxInternalBlock(const KaxInternalBlock & ElementToClone); ~KaxInternalBlock() override; - bool ValidateSize() const override; + bool SizeIsValid(std::uint64_t size) const override + { + return size >= 4; /// for the moment + } std::uint16_t TrackNum() const {return TrackNumber;} /*! diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp index ab3b3ff8..2753471b 100644 --- a/src/KaxBlock.cpp +++ b/src/KaxBlock.cpp @@ -42,11 +42,6 @@ SimpleDataBuffer::SimpleDataBuffer(const SimpleDataBuffer & ToClone) bValidValue = ToClone.bValidValue; } -bool KaxInternalBlock::ValidateSize() const -{ - return (GetSize() >= 4); /// for the moment -} - KaxInternalBlock::~KaxInternalBlock() { ReleaseFrames();