[FFmpeg-devel] [PATCH]lavf/mov: Export vendor metadata

wm4 nfxjfg at googlemail.com
Thu Jan 26 10:07:41 EET 2017


On Thu, 26 Jan 2017 08:26:02 +0100
Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2017-01-26 6:24 GMT+01:00 wm4 <nfxjfg at googlemail.com>:
> > On Thu, 26 Jan 2017 00:35:17 +0100
> > Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> >  
> >> 2017-01-26 0:19 GMT+01:00 Hendrik Leppkes <h.leppkes at gmail.com>:  
> >> > On Thu, Jan 26, 2017 at 10:04 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:  
> >> >> 2017-01-25 14:22 GMT+01:00 wm4 <nfxjfg at googlemail.com>:  
> >> >>> On Mon, 12 Dec 2016 12:12:37 +0100
> >> >>> Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> >> >>>  
> >> >>>> From 7c26220a8734fe7dc293efe6c13e3baf91defc7e Mon Sep 17 00:00:00 2001
> >> >>>> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> >> >>>> Date: Mon, 12 Dec 2016 12:07:27 +0100
> >> >>>> Subject: [PATCH 2/2] lavf/mov: Export vendor metadata.
> >> >>>>
> >> >>>> ---
> >> >>>>  libavformat/mov.c         |    5 ++++-
> >> >>>>  tests/ref/fate/mov-zombie |    2 +-
> >> >>>>  2 files changed, 5 insertions(+), 2 deletions(-)
> >> >>>>
> >> >>>> diff --git a/libavformat/mov.c b/libavformat/mov.c
> >> >>>> index 0b1c182..a19ebbf 100644
> >> >>>> --- a/libavformat/mov.c
> >> >>>> +++ b/libavformat/mov.c
> >> >>>> @@ -1842,6 +1842,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
> >> >>>>                                   AVStream *st, MOVStreamContext *sc)
> >> >>>>  {
> >> >>>>      uint8_t codec_name[32] = { 0 };
> >> >>>> +    uint8_t vendor[5] = { 0 };
> >> >>>>      int64_t stsd_start;
> >> >>>>      unsigned int len;
> >> >>>>
> >> >>>> @@ -1851,7 +1852,9 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
> >> >>>>
> >> >>>>      avio_rb16(pb); /* version */
> >> >>>>      avio_rb16(pb); /* revision level */
> >> >>>> -    avio_rb32(pb); /* vendor */
> >> >>>> +    avio_read(pb, vendor, 4);
> >> >>>> +    if (vendor[0])
> >> >>>> +        av_dict_set(&st->metadata, "vendor", vendor, 0);  
> >> >>>
> >> >>> Does this mean transcoding to a format with per-stream
> >> >>> tags will add this as a tag?  
> >> >>
> >> >> The patch you quoted allows libavformat users to read the
> >> >> vendor tag from mov files, I don't understand how it adds
> >> >> tags.
> >> >> Do you object?  
> >> >
> >> > Any metadata you export can and will get copied to a new file when
> >> > remuxing, therefor exporting arbitrary info that isn't actual stream
> >> > metadata tags in metadata is problematic - it carries over to the
> >> > destination file, in which it would be entirely meaningless.  
> >>
> >> Sorry, I don't understand:
> >> Which application do you mean?  
> >
> > ffmpeg  
> 
> Didn't I ping yesterday a patch that avoids this?
> And wasn't this the mail you answered?

Sorry, I couldn't find it just now. What was the subject line?

I'm not necessarily blocking your patch. There are already plenty of
other cases where it breaks this way, and your patch just adds another.
But maybe they can all be fixed by that patch you mentioned.



More information about the ffmpeg-devel mailing list