diff mbox

[FFmpeg-devel] lavf/mov: Accept multiple fourcc for AVID 1:1

Message ID 201611292210.47736.cehoyos@ag.or.at
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Nov. 29, 2016, 9:10 p.m. UTC
Hi!

Attached patch fixes ticket #5982.

Please comment, Carl Eugen
From add7f5d51491152af6d0431331543212c2c21ca4 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@ag.or.at>
Date: Tue, 29 Nov 2016 22:09:21 +0100
Subject: [PATCH] lavf/mov: Accept multiple fourcc for AVID 1:1.

Fixes ticket #5982.
---
 libavformat/mov.c |    1 +
 1 file changed, 1 insertion(+)

Comments

compn Dec. 1, 2016, 6:58 p.m. UTC | #1
On Tue, 29 Nov 2016 22:10:47 +0100
Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:

> From add7f5d51491152af6d0431331543212c2c21ca4 Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
> Date: Tue, 29 Nov 2016 22:09:21 +0100
> Subject: [PATCH] lavf/mov: Accept multiple fourcc for AVID 1:1.
> 
> Fixes ticket #5982.
> ---
>  libavformat/mov.c |    1 +
>  1 file changed, 1 insertion(+)

     if (codec_tag &&
          (codec_tag != format &&
+          (codec_tag != AV_RL32("AV1x") || format != AV_RL32("AVup")) &&
           // prores is allowed to have differing data format and codec tag
           codec_tag != AV_RL32("apcn") && codec_tag != AV_RL32("apch") &&
           // so is dv (sigh)

what about adding a comment like the prores/dv comments?
(or in a separate patch, make a nicer comment for prores,avid and dv?)

there are more than just these two AVID isoms.

a quick search reveals...

'AV1X': 'Avid 1:1x (Quick Time)',
'AVD1': 'Avid DV (Quick Time)',
'AVDN': 'Avid DNxHD (Quick Time)',
'AVMP': 'Avid IMX (Quick Time)',
'AVUP': 'Avid 10bit Packed (Quick Time)',

possibly AVin
sample here : http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket524/AVCI50.mov

do any of these isoms need to be added to the list in mov.c ?

otherwise, looks ok if tested with our av1x/avup samples.

thanks,
-compn
Carl Eugen Hoyos Dec. 1, 2016, 11:40 p.m. UTC | #2
2016-12-01 19:58 GMT+01:00 compn <tempn@mi.rr.com>:

>      if (codec_tag &&
>           (codec_tag != format &&
> +          (codec_tag != AV_RL32("AV1x") || format != AV_RL32("AVup")) &&
>            // prores is allowed to have differing data format and codec tag
>            codec_tag != AV_RL32("apcn") && codec_tag != AV_RL32("apch") &&
>            // so is dv (sigh)
>
> what about adding a comment like the prores/dv comments?

How should the comment look like?

Thank you, Carl Eugen
compn Dec. 2, 2016, 12:03 a.m. UTC | #3
On Fri, 2 Dec 2016 00:40:02 +0100
Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

> 2016-12-01 19:58 GMT+01:00 compn <tempn@mi.rr.com>:
> 
> >      if (codec_tag &&
> >           (codec_tag != format &&
> > +          (codec_tag != AV_RL32("AV1x") || format !=
> > AV_RL32("AVup")) && // prores is allowed to have differing data
> > format and codec tag codec_tag != AV_RL32("apcn") && codec_tag !=
> > AV_RL32("apch") && // so is dv (sigh)
> >
> > what about adding a comment like the prores/dv comments?
> 
> How should the comment look like?

// Avid codecs create different format and codec tags

no idea.

-compn
ffmpeg Dec. 6, 2016, 7:49 a.m. UTC | #4
On 2016-12-01 19:58, compn wrote:
> On Tue, 29 Nov 2016 22:10:47 +0100
> Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
> 
>> From add7f5d51491152af6d0431331543212c2c21ca4 Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
>> Date: Tue, 29 Nov 2016 22:09:21 +0100
>> Subject: [PATCH] lavf/mov: Accept multiple fourcc for AVID 1:1.
>> 
>> Fixes ticket #5982.
>> ---
>>  libavformat/mov.c |    1 +
>>  1 file changed, 1 insertion(+)
> 
>      if (codec_tag &&
>           (codec_tag != format &&
> +          (codec_tag != AV_RL32("AV1x") || format != AV_RL32("AVup")) 
> &&
>            // prores is allowed to have differing data format and codec 
> tag
>            codec_tag != AV_RL32("apcn") && codec_tag != AV_RL32("apch") 
> &&
>            // so is dv (sigh)
> 
> what about adding a comment like the prores/dv comments?
> (or in a separate patch, make a nicer comment for prores,avid and dv?)
> 
> there are more than just these two AVID isoms.
> 
> a quick search reveals...
> 
> 'AV1X': 'Avid 1:1x (Quick Time)',
> 'AVD1': 'Avid DV (Quick Time)',
> 'AVDN': 'Avid DNxHD (Quick Time)',
> 'AVMP': 'Avid IMX (Quick Time)',
> 'AVUP': 'Avid 10bit Packed (Quick Time)',
> 
> possibly AVin
> sample here : 
> http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket524/AVCI50.mov
> 
> do any of these isoms need to be added to the list in mov.c ?
> 
> otherwise, looks ok if tested with our av1x/avup samples.
> 

Can this patch be pushed to master please? Seems to work for me (I
orignally reported the issue). If any work still needs to be done , tell
me then I can have a look if I'm capable of doing it.

Kind regards,

Samuel


> thanks,
> -compn
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Carl Eugen Hoyos Dec. 12, 2016, 11:28 a.m. UTC | #5
2016-12-02 1:03 GMT+01:00 compn <tempn@mi.rr.com>:
> On Fri, 2 Dec 2016 00:40:02 +0100
> Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>
>> 2016-12-01 19:58 GMT+01:00 compn <tempn@mi.rr.com>:
>>
>> >      if (codec_tag &&
>> >           (codec_tag != format &&
>> > +          (codec_tag != AV_RL32("AV1x") || format !=
>> > AV_RL32("AVup")) && // prores is allowed to have differing data
>> > format and codec tag codec_tag != AV_RL32("apcn") && codec_tag !=
>> > AV_RL32("apch") && // so is dv (sigh)
>> >
>> > what about adding a comment like the prores/dv comments?
>>
>> How should the comment look like?
>
> // Avid codecs create different format and codec tags

Pushed with a similar comment.

Carl Eugen
diff mbox

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9bbb155..1c2d88d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2212,6 +2212,7 @@  static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb,
 
     if (codec_tag &&
          (codec_tag != format &&
+          (codec_tag != AV_RL32("AV1x") || format != AV_RL32("AVup")) &&
           // prores is allowed to have differing data format and codec tag
           codec_tag != AV_RL32("apcn") && codec_tag != AV_RL32("apch") &&
           // so is dv (sigh)