Commit a8c357c6 authored by Steve Lhomme's avatar Steve Lhomme

libebml2: use EBML_ElementContext() to access the ebml element context used to read

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@607 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent 160f8439
......@@ -217,7 +217,7 @@ EBML_DLL filepos_t EBML_ReadCodedSizeSignedValue(const uint8_t *InBuffer, size_t
EBML_DLL void EBML_ElementGetName(const ebml_element *Element, tchar_t *Out, size_t OutLen);
EBML_DLL const char *EBML_ElementGetClassName(const ebml_element *Element);
EBML_DLL filepos_t EBML_ElementFullSize(const ebml_element *Element, bool_t bWithDefault);
EBML_DLL const ebml_context *EBML_ElementContext(const ebml_element *Element);
EBML_DLL ebml_element *EBML_ElementSkipData(ebml_element *Element, stream *Input, const ebml_parser_context *Context, ebml_element *TestReadElt, bool_t AllowDummy);
EBML_DLL bool_t EBML_ElementIsFiniteSize(const ebml_element *Element);
......
......@@ -125,6 +125,11 @@ ebml_element *EBML_ElementSkipData(ebml_element *p, stream *Input, const ebml_pa
return Result;
}
const ebml_context *EBML_ElementContext(const ebml_element *Element)
{
return Element->Context;
}
filepos_t EBML_ElementFullSize(const ebml_element *Element, bool_t bWithDefault)
{
if (!bWithDefault && EBML_ElementIsDefaultValue(Element))
......
......@@ -125,7 +125,7 @@ static ebml_element *OutputElement(ebml_element *Element, const ebml_parser_cont
fprintf(stdout,"(master) [%"PRId64" bytes]",EBML_ElementDataSize(Element, 1));
EndLine(Element);
SubContext.UpContext = Context;
SubContext.Context = Element->Context;
SubContext.Context = EBML_ElementContext(Element);
SubContext.EndPosition = EBML_ElementPositionEnd(Element);
SubElement = EBML_FindNextElement(Input, &SubContext, &UpperElement, 1);
while (SubElement != NULL && UpperElement<=0 && (!EBML_ElementIsFiniteSize(Element) || EBML_ElementPosition(SubElement) <= EBML_ElementPositionEnd(Element)))
......
......@@ -560,7 +560,7 @@ static ebml_element *CheckMatroskaHead(const ebml_element *Head, const ebml_pars
tchar_t String[MAXLINE];
SubContext.UpContext = Parser;
SubContext.Context = Head->Context;
SubContext.Context = EBML_ElementContext(Head);
SubContext.EndPosition = EBML_ElementPositionEnd(Head);
SubElement = EBML_FindNextElement(Input, &SubContext, &UpperElement, 1);
while (SubElement)
......
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