Message ID | 20200128074446.7546-5-ffmpeg@gyani.pro |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/5] avformat/format: add av_find_input_format2 | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
On Tue, Jan 28, 2020 at 8:46 AM Gyan Doshi <ffmpeg@gyani.pro> wrote: > > --- > libavformat/mov.c | 6 +++--- > libavformat/utils.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 064fa88137..064d2b5f6e 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -8062,15 +8062,15 @@ static const AVOption mov_options[] = { > }; > > static const AVClass mov_class = { > - .class_name = "mov,mp4,m4a,3gp,3g2,mj2", > + .class_name = "qt,isobmff", > .item_name = av_default_item_name, > .option = mov_options, > .version = LIBAVUTIL_VERSION_INT, > }; > > AVInputFormat ff_mov_demuxer = { > - .name = "mov,mp4,m4a,3gp,3g2,mj2", > - .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"), > + .name = "qt,isobmff", > + .long_name = NULL_IF_CONFIG_SMALL("QuickTime / ISO Base Media File Format"), > .priv_class = &mov_class, > .priv_data_size = sizeof(MOVContext), > .extensions = "mov,mp4,m4a,3gp,3g2,mj2,psp,m4b,ism,ismv,isma,f4v", These names are strictly speaking part of the ABI, and I'm sure that some applications will use them to identify a format - I know that I do, for example. - Hendrik
On 28-01-2020 01:37 pm, Hendrik Leppkes wrote: > On Tue, Jan 28, 2020 at 8:46 AM Gyan Doshi <ffmpeg@gyani.pro> wrote: >> --- >> libavformat/mov.c | 6 +++--- >> libavformat/utils.c | 2 +- >> 2 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/libavformat/mov.c b/libavformat/mov.c >> index 064fa88137..064d2b5f6e 100644 >> --- a/libavformat/mov.c >> +++ b/libavformat/mov.c >> @@ -8062,15 +8062,15 @@ static const AVOption mov_options[] = { >> }; >> >> static const AVClass mov_class = { >> - .class_name = "mov,mp4,m4a,3gp,3g2,mj2", >> + .class_name = "qt,isobmff", >> .item_name = av_default_item_name, >> .option = mov_options, >> .version = LIBAVUTIL_VERSION_INT, >> }; >> >> AVInputFormat ff_mov_demuxer = { >> - .name = "mov,mp4,m4a,3gp,3g2,mj2", >> - .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"), >> + .name = "qt,isobmff", >> + .long_name = NULL_IF_CONFIG_SMALL("QuickTime / ISO Base Media File Format"), >> .priv_class = &mov_class, >> .priv_data_size = sizeof(MOVContext), >> .extensions = "mov,mp4,m4a,3gp,3g2,mj2,psp,m4b,ism,ismv,isma,f4v", > These names are strictly speaking part of the ABI, and I'm sure that > some applications will use them to identify a format - I know that I > do, for example. So, this has to be done with the next major bump for lavf? Gyan
On Tue, Jan 28, 2020 at 9:55 AM Gyan <ffmpeg@gyani.pro> wrote: > > > > On 28-01-2020 01:37 pm, Hendrik Leppkes wrote: > > On Tue, Jan 28, 2020 at 8:46 AM Gyan Doshi <ffmpeg@gyani.pro> wrote: > >> --- > >> libavformat/mov.c | 6 +++--- > >> libavformat/utils.c | 2 +- > >> 2 files changed, 4 insertions(+), 4 deletions(-) > >> > >> diff --git a/libavformat/mov.c b/libavformat/mov.c > >> index 064fa88137..064d2b5f6e 100644 > >> --- a/libavformat/mov.c > >> +++ b/libavformat/mov.c > >> @@ -8062,15 +8062,15 @@ static const AVOption mov_options[] = { > >> }; > >> > >> static const AVClass mov_class = { > >> - .class_name = "mov,mp4,m4a,3gp,3g2,mj2", > >> + .class_name = "qt,isobmff", > >> .item_name = av_default_item_name, > >> .option = mov_options, > >> .version = LIBAVUTIL_VERSION_INT, > >> }; > >> > >> AVInputFormat ff_mov_demuxer = { > >> - .name = "mov,mp4,m4a,3gp,3g2,mj2", > >> - .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"), > >> + .name = "qt,isobmff", > >> + .long_name = NULL_IF_CONFIG_SMALL("QuickTime / ISO Base Media File Format"), > >> .priv_class = &mov_class, > >> .priv_data_size = sizeof(MOVContext), > >> .extensions = "mov,mp4,m4a,3gp,3g2,mj2,psp,m4b,ism,ismv,isma,f4v", > > These names are strictly speaking part of the ABI, and I'm sure that > > some applications will use them to identify a format - I know that I > > do, for example. > > So, this has to be done with the next major bump for lavf? > Whats the advantage in renaming them at all? - Hendrik
On 28-01-2020 02:33 pm, Hendrik Leppkes wrote: > On Tue, Jan 28, 2020 at 9:55 AM Gyan <ffmpeg@gyani.pro> wrote: >> >> >> On 28-01-2020 01:37 pm, Hendrik Leppkes wrote: >>> On Tue, Jan 28, 2020 at 8:46 AM Gyan Doshi <ffmpeg@gyani.pro> wrote: >>>> --- >>>> libavformat/mov.c | 6 +++--- >>>> libavformat/utils.c | 2 +- >>>> 2 files changed, 4 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/libavformat/mov.c b/libavformat/mov.c >>>> index 064fa88137..064d2b5f6e 100644 >>>> --- a/libavformat/mov.c >>>> +++ b/libavformat/mov.c >>>> @@ -8062,15 +8062,15 @@ static const AVOption mov_options[] = { >>>> }; >>>> >>>> static const AVClass mov_class = { >>>> - .class_name = "mov,mp4,m4a,3gp,3g2,mj2", >>>> + .class_name = "qt,isobmff", >>>> .item_name = av_default_item_name, >>>> .option = mov_options, >>>> .version = LIBAVUTIL_VERSION_INT, >>>> }; >>>> >>>> AVInputFormat ff_mov_demuxer = { >>>> - .name = "mov,mp4,m4a,3gp,3g2,mj2", >>>> - .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"), >>>> + .name = "qt,isobmff", >>>> + .long_name = NULL_IF_CONFIG_SMALL("QuickTime / ISO Base Media File Format"), >>>> .priv_class = &mov_class, >>>> .priv_data_size = sizeof(MOVContext), >>>> .extensions = "mov,mp4,m4a,3gp,3g2,mj2,psp,m4b,ism,ismv,isma,f4v", >>> These names are strictly speaking part of the ABI, and I'm sure that >>> some applications will use them to identify a format - I know that I >>> do, for example. >> So, this has to be done with the next major bump for lavf? >> > Whats the advantage in renaming them at all? Accuracy, but it's just a nitpick. Gyan
On 28/01/2020 08:07, Hendrik Leppkes wrote: > These names are strictly speaking part of the ABI, and I'm sure that > some applications will use them to identify a format - I know that I > do, for example. To chime in: I do too. I thought it was considered ABI. Further, as far as I know, these are the only way to identify the format when using ffprobe in scripts (e.g. `ffprobe -of json -show_format input.ext`), and it'll break plenty of those scripts. Alternatives to checking this welcome. - Derek
diff --git a/libavformat/mov.c b/libavformat/mov.c index 064fa88137..064d2b5f6e 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8062,15 +8062,15 @@ static const AVOption mov_options[] = { }; static const AVClass mov_class = { - .class_name = "mov,mp4,m4a,3gp,3g2,mj2", + .class_name = "qt,isobmff", .item_name = av_default_item_name, .option = mov_options, .version = LIBAVUTIL_VERSION_INT, }; AVInputFormat ff_mov_demuxer = { - .name = "mov,mp4,m4a,3gp,3g2,mj2", - .long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"), + .name = "qt,isobmff", + .long_name = NULL_IF_CONFIG_SMALL("QuickTime / ISO Base Media File Format"), .priv_class = &mov_class, .priv_data_size = sizeof(MOVContext), .extensions = "mov,mp4,m4a,3gp,3g2,mj2,psp,m4b,ism,ismv,isma,f4v", diff --git a/libavformat/utils.c b/libavformat/utils.c index e22ca7cab8..b007127223 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1304,7 +1304,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, if (delay == 1 && pkt->dts == pkt->pts && pkt->dts != AV_NOPTS_VALUE && presentation_delayed) { av_log(s, AV_LOG_DEBUG, "invalid dts/pts combination %"PRIi64"\n", pkt->dts); - if ( strcmp(s->iformat->name, "mov,mp4,m4a,3gp,3g2,mj2") + if ( strcmp(s->iformat->name, "qt,isobmff") && strcmp(s->iformat->name, "flv")) // otherwise we discard correct timestamps for vc1-wmapro.ism pkt->dts = AV_NOPTS_VALUE; }