• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Simplify writing buffer · 8370c9c2
    Andreas Rheinhardt authored
    If one already has the contents of a master elements in a buffer of
    known size, then writing a EBML master element is no different from
    writing an EBML binary element. It is overtly complicated to use
    start/end_ebml_master() as these functions first write an unkown-length
    size field of the appropriate length, then write the buffer's contents,
    followed by a seek to the length field to overwrite it with the real
    size (obtained via avio_tell() although it was already known in
    advance), followed by another seek to the previous position. Just use
    put_ebml_binary() instead.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    8370c9c2
matroskaenc.c 103 KB