]> granicus.if.org Git - libmatroska/commitdiff
libmatroska: do not read data in KaxBlockVirtual, just skip it
authorSteve Lhomme <slhomme@matroska.org>
Sun, 12 Jun 2011 09:08:10 +0000 (09:08 +0000)
committerSteve Lhomme <slhomme@matroska.org>
Sun, 12 Jun 2011 09:08:10 +0000 (09:08 +0000)
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@753 a6f86f6d-0131-4f8e-9e7b-e335508773d5

matroska/KaxBlock.h
src/KaxBlock.cpp

index 03681c6cc923f0b7daa7efdfa867b5921569e93b..1fb3c9e9b3cf096809fb7cb0983617b28ea0ba43 100644 (file)
@@ -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
index 6d01a51693fa05e6aa1ee5536383a608e172988e..e96910e7febab2c0478b1a2df185257016f510cb 100644 (file)
@@ -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