[vlc-devel] [PATCH] Do not allow Matroska Void/CRC32 elements fallback when looking for a level 1 element

Steve Lhomme robux4 at gmail.com
Fri Feb 20 08:50:27 CET 2015


Yes, it's consistent with the original libebml code, just using a "global
context" that doesn't allow any global elements.

https://github.com/Matroska-Org/libebml/blob/master/src/EbmlContexts.cpp#L42

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.

On Thu, Feb 19, 2015 at 7:08 PM, Jean-Baptiste Kempf <jb at videolan.org>
wrote:

> On 18 Feb, Steve Lhomme wrote :
> > +static const EbmlSemanticContext & GetEbmlNoGlobal_Context();
> > +static const EbmlSemantic EbmlNoGlobal_ContextList[0] =
> > +{
> > +  //EbmlSemantic(false, false, EBML_INFO(EbmlCrc32)),   ///< EbmlCrc32
> > +  //EbmlSemantic(false, false, EBML_INFO(EbmlVoid)),    ///< EbmlVoid
> > +};
> > +static const EbmlSemanticContext EbmlNoGlobal_Context =
>
> static const for all those?
>
> With my kindest regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150220/51972b6c/attachment.html>


More information about the vlc-devel mailing list