Skip to content
  • Filip Roséen's avatar
    mkv: Reimplemented MkvTree and moved it to `Util.hpp` · d3f83dc8
    Filip Roséen authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    
    
    `MkvTree` can be used all across the module, meaning that it better
    belongs in `Util.hpp` than with static linkage in `matroska_segment_parse.cpp`.
    
     - A helper function `MkvTree_va` has been introduced so that one can
       easily call the function from functions that accepts a variadic
       number of arguments (using va_list).
    
     - The implementation has been optimized so that we do not need to
       allocate storage for the format string on every invocation if it
       would fit inside a fixed length buffer.
    
     - An error check has been added to signal if we run out of memory.
    
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    d3f83dc8