Commit 0a7a25eb authored by Steve Lhomme's avatar Steve Lhomme

libmatroska2: don't necessarily free blocks for which data cannot be read...

libmatroska2: don't necessarily free blocks for which data cannot be read again (all created in memory)

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@508 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent 84f505f9
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
PROJECT matroska2 PROJECT matroska2
{ {
PROJECT_NAME "libmatroska2" PROJECT_NAME "libmatroska2"
PROJECT_VERSION 0.10.0 PROJECT_VERSION 0.10.1
PROJECT_VENDOR "Matroska Foundation" PROJECT_VENDOR "Matroska Foundation"
} }
......
...@@ -115,7 +115,7 @@ EBML_DLL bool_t MATROSKA_BlockKeyframe(const matroska_block *Block); ...@@ -115,7 +115,7 @@ EBML_DLL bool_t MATROSKA_BlockKeyframe(const matroska_block *Block);
EBML_DLL bool_t MATROSKA_BlockDiscardable(const matroska_block *Block); EBML_DLL bool_t MATROSKA_BlockDiscardable(const matroska_block *Block);
EBML_DLL bool_t MATROSKA_BlockLaced(const matroska_block *Block); EBML_DLL bool_t MATROSKA_BlockLaced(const matroska_block *Block);
EBML_DLL err_t MATROSKA_BlockReadData(matroska_block *Block, stream *Input); EBML_DLL err_t MATROSKA_BlockReadData(matroska_block *Block, stream *Input);
EBML_DLL err_t MATROSKA_BlockReleaseData(matroska_block *Block); EBML_DLL err_t MATROSKA_BlockReleaseData(matroska_block *Block, bool_t NotRead);
EBML_DLL int16_t MATROSKA_CueTrackNum(const matroska_cuepoint *Cue); EBML_DLL int16_t MATROSKA_CueTrackNum(const matroska_cuepoint *Cue);
EBML_DLL void MATROSKA_CuesSort(ebml_master *Cues); EBML_DLL void MATROSKA_CuesSort(ebml_master *Cues);
EBML_DLL fourcc_t MATROSKA_MetaSeekID(const matroska_seekpoint *MetaSeek); EBML_DLL fourcc_t MATROSKA_MetaSeekID(const matroska_seekpoint *MetaSeek);
......
...@@ -1291,8 +1291,10 @@ static size_t GetBlockHeadSize(const matroska_block *Element) ...@@ -1291,8 +1291,10 @@ static size_t GetBlockHeadSize(const matroska_block *Element)
return 5; return 5;
} }
err_t MATROSKA_BlockReleaseData(matroska_block *Block) err_t MATROSKA_BlockReleaseData(matroska_block *Block, bool_t NotRead)
{ {
if (!NotRead && Block->GlobalTimecode==INVALID_TIMECODE_T)
return ERR_NONE;
ArrayClear(&Block->Data); ArrayClear(&Block->Data);
Block->Base.Base.bValueIsSet = 0; Block->Base.Base.bValueIsSet = 0;
if (ARRAYCOUNT(Block->SizeListIn,int32_t)) if (ARRAYCOUNT(Block->SizeListIn,int32_t))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment