• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Avoid seeking when writing level 1 elements · e04a24e7
    Andreas Rheinhardt authored
    Up until now, the writing process for level 1 elements (those elements
    for which CRC-32 elements are written by default) was this in case the
    output was seekable: Write the EBML ID, write an "unkown length" EBML
    number of the desired length, then write the element into a dynamic
    buffer, then write the dynamic buffer (after possible calculation and
    writing of the CRC-element), then seek back to the size element and
    overwrite the unknown-size element with the real size. The seeking and
    overwriting part has been eliminated by not writing the size initially.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
    e04a24e7
matroskaenc.c 105 KB