From: Steve Lhomme Date: Sun, 12 Jun 2011 09:08:10 +0000 (+0000) Subject: libmatroska: do not read data in KaxBlockVirtual, just skip it X-Git-Tag: release-1.2.0~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5f263461ff0cf0532408023976b104792694a86;p=libmatroska libmatroska: do not read data in KaxBlockVirtual, just skip it git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@753 a6f86f6d-0131-4f8e-9e7b-e335508773d5 --- diff --git a/matroska/KaxBlock.h b/matroska/KaxBlock.h index 03681c6..1fb3c9e 100644 --- a/matroska/KaxBlock.h +++ b/matroska/KaxBlock.h @@ -372,6 +372,8 @@ DECLARE_MKX_BINARY_CONS(KaxBlockVirtual) void SetParent(const KaxCluster & aParentCluster) {ParentCluster = &aParentCluster;} filepos_t RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault); + + filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA); protected: uint64 Timecode; // temporary timecode of the first frame if there are more than one diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp index 6d01a51..e96910e 100644 --- a/src/KaxBlock.cpp +++ b/src/KaxBlock.cpp @@ -1034,4 +1034,10 @@ void KaxBlockBlob::SetBlockGroup( KaxBlockGroup &BlockRef ) Block.group = &BlockRef; } +filepos_t KaxBlockVirtual::ReadData(IOCallback & input, ScopeMode ReadFully) +{ + input.setFilePointer(SizePosition + CodedSizeLength(Size, SizeLength, bSizeIsFinite) + Size, seek_beginning); + return GetSize(); +} + END_LIBMATROSKA_NAMESPACE