Message ID | 1515233228-16796-3-git-send-email-osmanx@problemloesungsmaschine.de |
---|---|
State | Accepted |
Commit | 81b0d591d690f518c01c45d7ce20fdca1de80d80 |
Headers | show |
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
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
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
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 --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 };
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> --- libavformat/libopenmpt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)