Commit 3079892f authored by Steve Lhomme's avatar Steve Lhomme

libmatroska2: fix the reading of non-laced Block data when the compressed...

libmatroska2: fix the reading of non-laced Block data when the compressed header was used on output and the size tweaked that way

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@452 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent 3486ec84
......@@ -3,7 +3,7 @@
PROJECT matroska2
{
PROJECT_NAME "libmatroska2"
PROJECT_VERSION 0.9.13
PROJECT_VERSION 0.9.14
PROJECT_VENDOR "Matroska Foundation"
}
......
......@@ -1326,17 +1326,17 @@ err_t MATROSKA_BlockReadData(matroska_block *Element, stream *Input)
switch (Element->Lacing)
{
case LACING_NONE:
ArrayResize(&Element->Data,(size_t)Element->Base.Base.DataSize - GetBlockHeadSize(Element) + (Header?(size_t)Header->DataSize:0),0);
ArrayResize(&Element->Data,(size_t)ARRAYBEGIN(Element->SizeList,int32_t)[0] + (Header?(size_t)Header->DataSize:0),0);
Buf = ARRAYBEGIN(Element->Data,uint8_t);
if (Header)
{
memcpy(Buf,ARRAYBEGIN(((ebml_binary*)Header)->Data,uint8_t),(size_t)Header->DataSize);
Buf += (size_t)Header->DataSize;
}
Err = Stream_Read(Input,Buf,(size_t)Element->Base.Base.DataSize - GetBlockHeadSize(Element),&Read);
Err = Stream_Read(Input,Buf,(size_t)ARRAYBEGIN(Element->SizeList,int32_t)[0],&Read);
if (Err != ERR_NONE)
goto failed;
if (Read != Element->Base.Base.DataSize - GetBlockHeadSize(Element))
if (Read != (size_t)ARRAYBEGIN(Element->SizeList,int32_t)[0])
{
Err = ERR_READ;
goto failed;
......@@ -1811,7 +1811,7 @@ static err_t RenderBlockData(matroska_block *Element, stream *Output, bool_t bFo
*Rendered += Written;
free(LaceHead);
}
Node_SET(Element,MATROSKA_BLOCK_READ_TRACK,&Element->WriteTrack); // now use the write track to read the same element
Node_SET(Element,MATROSKA_BLOCK_READ_TRACK,&Element->WriteTrack); // now use the write track for consecutive read of the same element
Cursor = ARRAYBEGIN(Element->Data,uint8_t);
ToWrite = ARRAYCOUNT(Element->Data,uint8_t);
......
2010-07-25
version 0.4.5:
- fix --remux when BlockGroup was encountered (rather than SimpleBlock)
- fix --optimize on video tracks
2010-07-25
version 0.4.4:
......
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