Commit Graph

10 Commits

Author SHA1 Message Date
Jörn Heusipp 8b1b25a86f avformat/libopenmpt: Update to libopenmpt 0.3 API
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: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jörn Heusipp a571a2a65a avformat/libopenmpt: Fix mixed code and declarations
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Jörn Heusipp 3d2da6d585
avformat/libopenmpt: Query duration and metadata after selecting subsong
Duration depends on the selected subsong and thus must be queried after
selecting the subsong. There is no compelling reason to query other
metadata earlier either.

Tested with libopenmpt version: 0.2.8760-beta27
Libopenmpt configure options: --without-ogg --without-vorbis
--without-vorbisfile --without-portaudio --without-portaudiocpp
--without-mpg123 --without-pulseaudio --without-sndfile --without-flac

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2017-09-24 15:54:38 +01:00
Michael Niedermayer bd8201566d avformat/libopenmpt: Check for avio_size() failure
Fixes CID1396850

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-30 23:35:18 +02:00
Andreas Cadhalpun 367cac7827 libopenmpt: add missing avio_read return value check
This fixes heap-buffer-overflows in libopenmpt caused by interpreting
the negative size value as unsigned size_t.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-16 02:54:04 +01:00
Jörn Heusipp 64131b87d6 libopenmpt: Add "date" to metadata.
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-07-21 02:47:35 +01:00
Jörn Heusipp 840df1f193 libopenmpt: set stream duration and fix time base
Fix the confusion around the used time base.

Check size returned from avio_size()

Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-07-21 02:47:35 +01:00
Josh de Kock 9134d2df5b libopenmpt: add subsong support
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-07-21 02:47:35 +01:00
Jörn Heusipp f1eb6ddcb3 libavformat/libopenmpt: Fix memory leak in error path in read_header_openmpt().
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-17 16:20:46 +02:00
Josh de Kock d52dd768a3 lavf: add libopenmpt demuxer
Fixes ticket #5623

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-15 20:59:25 +02:00