<div dir="ltr"><div>Yes, it's consistent with the original libebml code, just using a "global context" that doesn't allow any global elements.<br><br><a href="https://github.com/Matroska-Org/libebml/blob/master/src/EbmlContexts.cpp#L42">https://github.com/Matroska-Org/libebml/blob/master/src/EbmlContexts.cpp#L42</a><br><br></div>This a little hackish but fits the design/principle of libebml. A better way to do this should be passing a callback that decides which element is allowed in which position. That's more flexible than hardcoded semantic. In our case we don't need it. It would just allow parsing unknown level-1 elements (4-bytes EBML ID) instead of skipping data byte by byte.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 19, 2015 at 7:08 PM, Jean-Baptiste Kempf <span dir="ltr"><<a href="mailto:jb@videolan.org" target="_blank">jb@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 18 Feb, Steve Lhomme wrote :<br>
<span class="">> +static const EbmlSemanticContext & GetEbmlNoGlobal_Context();<br>
</span><span class="">> +static const EbmlSemantic EbmlNoGlobal_ContextList[0] =<br>
> +{<br>
> +  //EbmlSemantic(false, false, EBML_INFO(EbmlCrc32)),   ///< EbmlCrc32<br>
> +  //EbmlSemantic(false, false, EBML_INFO(EbmlVoid)),    ///< EbmlVoid<br>
> +};<br>
> +static const EbmlSemanticContext EbmlNoGlobal_Context =<br>
<br>
</span>static const for all those?<br>
<br>
With my kindest regards,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Jean-Baptiste Kempf<br>
<a href="http://www.jbkempf.com/" target="_blank">http://www.jbkempf.com/</a> - <a href="tel:%2B33%20672%20704%20734" value="+33672704734">+33 672 704 734</a><br>
Sent from my Electronic Device<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
</font></span></blockquote></div><br></div>