summaryrefslogtreecommitdiff
path: root/libavformat/libopenmpt.c
Commit message (Collapse)AuthorAge
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat/libopenmpt: Fix successfull typoMichael Niedermayer2018-12-31
| | | | | Reviewed-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/libopenmpt: Probe file format from file data if possibleJörn Heusipp2018-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with libopenmpt 0.3, use the libopenmpt file header probing functions for probing. libopenmpt probing functions are allocation-free and designed to be as fast as possible. For libopenmpt 0.2, or when libopenmpt 0.3 file header probing cannot probe successfully due to too small probe buffer, test the filename against the file extensions supported by the libopenmpt library that is actually linked, instead of relying on a hard-coded file extension list. File extension testing is also allocation-free and designed to be fast in libopenmpt. Avoiding a hard-coded file extension list is useful because later libopenmpt versions will likely add support for more module file formats. libopenmpt file header probing is tested regularly against the FATE suite and other diverse file collections by libopenmpt upstream in order to avoid false positives. FATE passes with './configure --enable-libopenmpt' as well as with './configure --enable-libopenmpt --enable-libmodplug'. libopenmpt probing adds about 5%..10% cpu time (depending on precise usage pattern and host CPU and compiler version used for libopenmpt) compared to all current internal FFmpeg probing functions combined in tools/probetest for all of its module formats combined (currently 41 modules formats in libopenmpt 0.3.4 and 234 file formats in FFmpeg). Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Reviewed-by: Josh de Kock <josh@itanimul.li> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/libopenmpt: Update file extensions list for libopenmpt 0.3Jörn Heusipp2018-03-20
| | | | | | Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Reviewed-by: Josh de Kock <josh@itanimul.li> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/libopenmpt: Update to libopenmpt 0.3 APIJörn Heusipp2018-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avformat/libopenmpt: Fix mixed code and declarationsJörn Heusipp2018-01-12
| | | | | Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/libopenmpt: Query duration and metadata after selecting subsongJörn Heusipp2017-09-24
| | | | | | | | | | | | | | 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>
* avformat/libopenmpt: Check for avio_size() failureMichael Niedermayer2017-03-30
| | | | | | Fixes CID1396850 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libopenmpt: add missing avio_read return value checkAndreas Cadhalpun2017-01-16
| | | | | | | | | 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>
* libopenmpt: Add "date" to metadata.Jörn Heusipp2016-07-21
| | | | | Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Signed-off-by: Josh de Kock <josh@itanimul.li>
* libopenmpt: set stream duration and fix time baseJörn Heusipp2016-07-21
| | | | | | | | | 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>
* libopenmpt: add subsong supportJosh de Kock2016-07-21
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* libavformat/libopenmpt: Fix memory leak in error path in read_header_openmpt().Jörn Heusipp2016-07-17
| | | | | Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: add libopenmpt demuxerJosh de Kock2016-07-15
Fixes ticket #5623 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>