From d7256912c6cf5806a25c6875486b464837e0d0a8 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 28 Jan 2024 14:05:05 +0100 Subject: [PATCH] fix EbmlId construction from a buffer --- src/KaxSeekHead.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/KaxSeekHead.cpp b/src/KaxSeekHead.cpp index a850012d..c23cae6e 100644 --- a/src/KaxSeekHead.cpp +++ b/src/KaxSeekHead.cpp @@ -45,7 +45,7 @@ KaxSeek * KaxSeekHead::FindFirstOf(const EbmlCallbacks & Callbacks) const { return (EbmlId(*Elt) == EBML_ID(KaxSeekID)); }); if (it != aElt->end()) { const auto aId = static_cast(*it); - const auto aEbmlId = EbmlId(aId->GetBuffer(), aId->GetSize()); + const auto aEbmlId = EbmlId(EbmlId::FromBuffer(aId->GetBuffer(), aId->GetSize())); if (aEbmlId == EBML_INFO_ID(Callbacks)) { return aElt; } @@ -84,7 +84,7 @@ bool KaxSeek::IsEbmlId(const EbmlId & aId) const auto _Id = static_cast(FindFirstElt(EBML_INFO(KaxSeekID))); if (!_Id) return false; - const auto aEbmlId = EbmlId(_Id->GetBuffer(), _Id->GetSize()); + const auto aEbmlId = EbmlId(EbmlId::FromBuffer(_Id->GetBuffer(), _Id->GetSize())); return (aId == aEbmlId); } @@ -96,8 +96,8 @@ bool KaxSeek::IsEbmlId(const KaxSeek & aPoint) const auto _IdB = static_cast(aPoint.FindFirstElt(EBML_INFO(KaxSeekID))); if (!_IdB) return false; - const auto aEbmlIdA = EbmlId(_IdA->GetBuffer(), _IdA->GetSize()); - const auto aEbmlIdB = EbmlId(_IdB->GetBuffer(), _IdB->GetSize()); + const auto aEbmlIdA = EbmlId(EbmlId::FromBuffer(_IdA->GetBuffer(), _IdA->GetSize())); + const auto aEbmlIdB = EbmlId(EbmlId::FromBuffer(_IdB->GetBuffer(), _IdB->GetSize())); return aEbmlIdA == aEbmlIdB; }