[Matroska-devel] clarifications on the use of Unknown Sized Elements

Steve Lhomme slhomme at matroska.org
Thu Jun 11 07:42:32 CEST 2015


On Tue, Jun 9, 2015 at 8:48 AM, Moritz Bunkus <moritz at bunkus.org> wrote:
> Hey,
>
>> - Only Elements that are Master-elements may use an unknown size.
>
> I would be good with this, even though I don't know whether or not we
> had that restriction before.
>
>> - When is the Element of Unknown Size ended. In discussions (in
>>   github, mailing list, and irc) there has been two answers to this:
>>       1. Upon the first occurrence of an Element that is not a valid
>>          sub-element of the unknown-sized element.
>>       2. Upon the first occurrence of an Element that is at the same or a
>>          higher level than the one with an infite size
>
> I was the one who said 2.; basically what I meant was 1. 1. is more
> precise than my wording yesterday (2.), therefore disregard 2., please.
>
> 1. also hints at the problem with elements than can occur at multiple
> levels (EbmlVoid, SimpleTags).
>
>> - Dependency on Schema
>
>> For the SimpleTag option available, the interpretation of the ending
>> of the element presumes that the parse has knowledge of the EBML
>> Schema/Profile of mastroska in any version 1-4. I'd like to include
>> some statement to say that the use of an element of unknown size
>> requires the use of the corresponding schema.
>
> Hmm… going with 1. from before we could indeed have a scenario where an
> element from (a hypothetical version) v5 may include an element from
> earlier versions, e.g. we introduce KaxÜberTags (v5 element) which may
> include the already existing KaxTag elements (v4).
>
> In that situation a parser that only knows v1-v4 but not v5 could find
> itself in a situation where a KaxÜberTags master has an infinite size,
> but the parser would then erroneously see that KaxTag as the end of the
> unknown infinite-sized KaxÜberTags.

That's a problem only if the shared KagTag element is found at a lower
level than where we found the infinite size element. If it's at a
higher level, it's skipped until some element at a similar or lower
level is found. But still a valid case that should be mutually
exclusive with the use on unknown elements.

libebml already works like that to skip data as it rely on the context level.

> So you may be right, and Steve might be wrong.
>
> Kind regards,
> mosu
>
> _______________________________________________
> Matroska-devel mailing list
> Matroska-devel at lists.matroska.org
> http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
> Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel



-- 
Steve Lhomme
Matroska association Chairman


More information about the Matroska-devel mailing list