From d0931cf0462b327060fba335023a90a7a2ff9af2 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Thu, 15 Apr 2010 14:59:25 +0000 Subject: [PATCH] v1/v2: clean the access of EbmlId data git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@124 a6f86f6d-0131-4f8e-9e7b-e335508773d5 --- src/KaxSeekHead.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/KaxSeekHead.cpp b/src/KaxSeekHead.cpp index 9035b52..cbc459e 100644 --- a/src/KaxSeekHead.cpp +++ b/src/KaxSeekHead.cpp @@ -71,10 +71,8 @@ void KaxSeekHead::IndexThis(const EbmlElement & aElt, const KaxSegment & ParentS KaxSeekID & aNewID = GetChild(aNewPoint); binary ID[4]; - for (int i=EBML_ID_LENGTH(EbmlId(aElt)); i>0; i--) { - ID[4-i] = (EBML_ID_VALUE(EbmlId(aElt)) >> 8*(i-1)) & 0xFF; - } - aNewID.CopyBuffer(ID, EBML_ID_LENGTH(EbmlId(aElt))); + ((const EbmlId&)aElt).Fill(ID); + aNewID.CopyBuffer(ID, EBML_ID_LENGTH((const EbmlId&)aElt)); } KaxSeek * KaxSeekHead::FindFirstOf(const EbmlCallbacks & Callbacks) const -- 2.40.0