• Jörn Heusipp's avatar
    avformat/libopenmpt: Update to libopenmpt 0.3 API · 8b1b25a8
    Jörn Heusipp authored
    libopenmpt 0.3 deprecates openmpt_module_create_from_memory() and
    provides a replacement function openmpt_module_create_from_memory2().
    
    Detecting libopenmpt 0.3 can be done at build time via the API
    version macros provided by libopenmpt. libopenmpt 0.2 did not provide
    all required macros, however libopenmpt documents the required #define
    shims that can be safely added for libopenmpt 0.2.
    
    Using openmpt_module_create_from_memory2() instead of
    openmpt_module_create_from_memory() avoids the deprecation warning
    when building ffmpeg with libopenmpt 0.3.
    
    openmpt_module_create_from_memory2() provides more fine-grained error
    reporting and in particular allows distinguishing out-of-memory from
    input file parsing errors. Return appropriate ffmpeg errors
    accordingly.
    
    libopenmpt 0.3 is ABI and API compatible with applications built
    against libopenmpt 0.2. Building ffmpeg with libopenmpt 0.2 is still
    supported.
    Signed-off-by: 's avatarJörn Heusipp <osmanx@problemloesungsmaschine.de>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    8b1b25a8
libopenmpt.c 8.5 KB