• Andreas Rheinhardt's avatar
    avformat/matroskadec: Accept more unknown-length elements II · 71c90881
    Andreas Rheinhardt authored
    Up until now, one last kind of unknown-length element hasn't been
    properly handled: Unknown-length elements that are supposed to be
    skipped, i.e. the level 1 elements that might reside after the
    clusters.
    
    This commit changes this. To do this, ebml_parse got a mode that
    essentially tries to skip everything except when parsing is needed
    (namely for unknown-length elements for which parsing is necessary
    as they can't be skipped). This mode is selected by using a NULL
    as destination where the parsed data should be written to.
    It is used to parse the level 1 elements in matroska_parse_cluster.
    
    The syntax list used for parsing must of course include links to
    the syntax of all the master elements that might need to be parsed.
    In other words: Instead of matroska_clusters (which contained every
    level 1 element except clusters as EBML_NONE elements designated to
    be skipped) matroska_segment is needed and used; matroska_clusters has
    been removed.
    
    Furthermore, matroska_segment has been reordered so that clusters are at
    the front as this is now the most common case for this list.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    71c90881
matroskadec.c 158 KB