Commit 84f505f9 authored by Steve Lhomme's avatar Steve Lhomme

libebml2: some fixes for the CRC writing

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@507 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent 3144d146
...@@ -281,5 +281,6 @@ void EBML_CRCAddBuffer(ebml_crc *CRC, const uint8_t *Buf, size_t Size) ...@@ -281,5 +281,6 @@ void EBML_CRCAddBuffer(ebml_crc *CRC, const uint8_t *Buf, size_t Size)
void EBML_CRCFinalize(ebml_crc *CRC) void EBML_CRCFinalize(ebml_crc *CRC)
{ {
CRC->CRC ^= CRC32_NEGL; CRC->CRC ^= CRC32_NEGL;
CRC->Base.DataSize = 4;
CRC->Base.bValueIsSet = 1; CRC->Base.bValueIsSet = 1;
} }
...@@ -439,7 +439,7 @@ static err_t RenderData(ebml_master *Element, stream *Output, bool_t bForceRende ...@@ -439,7 +439,7 @@ static err_t RenderData(ebml_master *Element, stream *Output, bool_t bForceRende
Err = ERR_OUT_OF_MEMORY; Err = ERR_OUT_OF_MEMORY;
else else
{ {
filepos_t Offset = Stream_Seek(Output,0,SEEK_CUR); filepos_t Offset = Stream_Seek(Output,0,SEEK_CUR) + 6;
Node_Set(VOutput, MEMSTREAM_DATA, ARRAYBEGIN(TmpBuf,uint8_t), ARRAYCOUNT(TmpBuf,uint8_t)); Node_Set(VOutput, MEMSTREAM_DATA, ARRAYBEGIN(TmpBuf,uint8_t), ARRAYCOUNT(TmpBuf,uint8_t));
Node_SET(VOutput, MEMSTREAM_OFFSET, &Offset); Node_SET(VOutput, MEMSTREAM_OFFSET, &Offset);
Err = InternalRender(Element, VOutput, bForceRender, bWithDefault, Rendered); Err = InternalRender(Element, VOutput, bForceRender, bWithDefault, Rendered);
......
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