diff mbox

[FFmpeg-devel,3/4] avformat/libopenmpt: Update file extensions list for libopenmpt 0.3

Message ID 1515233228-16796-3-git-send-email-osmanx@problemloesungsmaschine.de
State Accepted
Commit 81b0d591d690f518c01c45d7ce20fdca1de80d80
Headers show

Commit Message

Jörn Heusipp Jan. 6, 2018, 10:07 a.m. UTC
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
---
 libavformat/libopenmpt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Carl Eugen Hoyos Jan. 6, 2018, 3:06 p.m. UTC | #1
2018-01-06 11:07 GMT+01:00 Jörn Heusipp <osmanx@problemloesungsmaschine.de>:
> Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
> ---
>  libavformat/libopenmpt.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
> index 30c3d6e..5efbdc4 100644
> --- a/libavformat/libopenmpt.c
> +++ b/libavformat/libopenmpt.c
> @@ -234,5 +234,9 @@ AVInputFormat ff_libopenmpt_demuxer = {
>      .read_close     = read_close_openmpt,
>      .read_seek      = read_seek_openmpt,
>      .priv_class     = &class_openmpt,
> -    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,stk,stm,ult,umx,wow,xm,xpk",
> +#if OPENMPT_API_VERSION_AT_LEAST(0,3,0)
> +    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,dtm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,stp,ult,umx,wow,xm,xpk",
> +#else
> +    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,ult,umx,wow,xm,xpk",
> +#endif

I believe this change can be made without the version check.

Carl Eugen
Jörn Heusipp Jan. 7, 2018, 2:40 p.m. UTC | #2
On 01/06/2018 04:06 PM, Carl Eugen Hoyos wrote:
> 2018-01-06 11:07 GMT+01:00 Jörn Heusipp <osmanx@problemloesungsmaschine.de>:
>> Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de>
>> ---
>>   libavformat/libopenmpt.c | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
>> index 30c3d6e..5efbdc4 100644
>> --- a/libavformat/libopenmpt.c
>> +++ b/libavformat/libopenmpt.c
>> @@ -234,5 +234,9 @@ AVInputFormat ff_libopenmpt_demuxer = {
>>       .read_close     = read_close_openmpt,
>>       .read_seek      = read_seek_openmpt,
>>       .priv_class     = &class_openmpt,
>> -    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,stk,stm,ult,umx,wow,xm,xpk",
>> +#if OPENMPT_API_VERSION_AT_LEAST(0,3,0)
>> +    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,dtm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,stp,ult,umx,wow,xm,xpk",
>> +#else
>> +    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,ult,umx,wow,xm,xpk",
>> +#endif
> 
> I believe this change can be made without the version check.

Why would that be better? I cannot see much use in listing file 
extensions that are not supported by the libopenmpt version ffmpeg 
builds against.
If you prefer to have that changed, I'll do so. I would merely like to 
understand the reasons why.

Regards,
Jörn
Carl Eugen Hoyos Jan. 7, 2018, 11:48 p.m. UTC | #3
2018-01-07 15:40 GMT+01:00 Jörn Heusipp <osmanx@problemloesungsmaschine.de>:
>
> On 01/06/2018 04:06 PM, Carl Eugen Hoyos wrote:
>>
>> 2018-01-06 11:07 GMT+01:00 Jörn Heusipp
>> <osmanx@problemloesungsmaschine.de>:

>>> -    .extensions     =
>>> "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,stk,stm,ult,umx,wow,xm,xpk",
>>> +#if OPENMPT_API_VERSION_AT_LEAST(0,3,0)
>>> +    .extensions     =
>>> "669,amf,ams,dbm,digi,dmf,dsm,dtm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,stp,ult,umx,wow,xm,xpk",
>>> +#else
>>> +    .extensions     =
>>> "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,ult,umx,wow,xm,xpk",
>>> +#endif
>>
>>
>> I believe this change can be made without the version check.
>
> Why would that be better?

Only because of the simplification:
Other parts of FFmpeg will not support the files anyway, and I am sure
we can find a real-world files that have one of above extensions but are
not supported by libopenmpt (because they are completely different
files).

Can't libopenmpt be configured to support only some of above file
types?

But feel free to ignore my suggestion.

Carl Eugen
Jörn Heusipp Jan. 8, 2018, 7:23 p.m. UTC | #4
On 01/08/2018 12:48 AM, Carl Eugen Hoyos wrote:
> 2018-01-07 15:40 GMT+01:00 Jörn Heusipp <osmanx@problemloesungsmaschine.de>:
>> On 01/06/2018 04:06 PM, Carl Eugen Hoyos wrote:
>>> 2018-01-06 11:07 GMT+01:00 Jörn Heusipp
>>> <osmanx@problemloesungsmaschine.de>:


>>>> -    .extensions     =
>>>> "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,stk,stm,ult,umx,wow,xm,xpk",
>>>> +#if OPENMPT_API_VERSION_AT_LEAST(0,3,0)
>>>> +    .extensions     =
>>>> "669,amf,ams,dbm,digi,dmf,dsm,dtm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,stp,ult,umx,wow,xm,xpk",
>>>> +#else
>>>> +    .extensions     =
>>>> "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,ult,umx,wow,xm,xpk",
>>>> +#endif
>>>
>>>
>>> I believe this change can be made without the version check.
>>
>> Why would that be better?
> 
> Only because of the simplification:
> Other parts of FFmpeg will not support the files anyway, and I am sure
> we can find a real-world files that have one of above extensions but are
> not supported by libopenmpt (because they are completely different
> files).

Absolutely. Without doing any further research, I know at least of .mod 
(also used by JVC camcorders and others for some MPEG variant (I do not 
know the details)) and .umx (which can also contain wav or mp3 or 
similar instead of module music files). Also, .sfx is probably used by a 
ton of games as a generic extension for any sound effects.
Given the sheer amount of file extensions, there are likely even more 
conflicts that I am not aware of.

> Can't libopenmpt be configured to support only some of above file
> types?

No, that is not possible.

> But feel free to ignore my suggestion.

Listing too many file extensions increases the chance of false-positives 
which I think warrants listing as few as possible depending on 
libopenmpt version.
In any case, I do not have a particularly strong opinion on that matter.
So maybe someone else wants to comment on that?


Regards,
Jörn
diff mbox

Patch

diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
index 30c3d6e..5efbdc4 100644
--- a/libavformat/libopenmpt.c
+++ b/libavformat/libopenmpt.c
@@ -234,5 +234,9 @@  AVInputFormat ff_libopenmpt_demuxer = {
     .read_close     = read_close_openmpt,
     .read_seek      = read_seek_openmpt,
     .priv_class     = &class_openmpt,
-    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,stk,stm,ult,umx,wow,xm,xpk",
+#if OPENMPT_API_VERSION_AT_LEAST(0,3,0)
+    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,dtm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,stp,ult,umx,wow,xm,xpk",
+#else
+    .extensions     = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,ice,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,st26,stk,stm,ult,umx,wow,xm,xpk",
+#endif
 };