diff mbox series

[FFmpeg-devel,5/5] avformat/mov: correct to representative names for mov.c

Message ID 20200128074446.7546-5-ffmpeg@gyani.pro
State New
Headers show
Series [FFmpeg-devel,1/5] avformat/format: add av_find_input_format2
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Gyan Doshi Jan. 28, 2020, 7:44 a.m. UTC
---
 libavformat/mov.c   | 6 +++---
 libavformat/utils.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Hendrik Leppkes Jan. 28, 2020, 8:07 a.m. UTC | #1
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
Gyan Doshi Jan. 28, 2020, 8:55 a.m. UTC | #2
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
Hendrik Leppkes Jan. 28, 2020, 9:03 a.m. UTC | #3
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
Gyan Doshi Jan. 28, 2020, 9:14 a.m. UTC | #4
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
Derek Buitenhuis Jan. 29, 2020, 8:09 p.m. UTC | #5
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 mbox series

Patch

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;
     }