[FFmpeg-devel] [PATCH 2/2] avformat/libmodplug: Remove code that has become redundant

Jörn Heusipp osmanx at problemloesungsmaschine.de
Sat Jul 16 16:31:55 EEST 2016

On 07/15/2016 10:41 PM, Michael Niedermayer wrote:
> @@ -372,7 +361,6 @@ AVInputFormat ff_libmodplug_demuxer = {
>       .name           = "libmodplug",
>       .long_name      = NULL_IF_CONFIG_SMALL("ModPlug demuxer"),
>       .priv_data_size = sizeof(ModPlugContext),
> -    .read_probe     = modplug_probe,
>       .read_header    = modplug_read_header,
>       .read_packet    = modplug_read_packet,
>       .read_close     = modplug_read_close,

This breaks probing any module file if both libmodplug and libopenmpt 
are enabled.
Looking at the probing logic, this is due to

         } else if (score == score_max)
             fmt = NULL;

in av_probe_input_format3().

Unless one of libopenmpt and libmodplug demuxers lowers its own file 
extension probing score, this will not work, as they both handle pretty 
much the same file formats.
As a libopenmpt maintainer, I (obviously) favour the current status, 
i.e. libmodplug scoring lower. See 
https://lib.openmpt.org/libopenmpt/#sec_faq "What are the differences 
between libopenmpt and libmodplug?" for some discussion on that matter.
When the libopenmpt demuxer gets some more appropriate probing logic (I 
am working in that right now), the explicit libmodplug probe function 
could be removed.


More information about the ffmpeg-devel mailing list