[FFmpeg-devel] [PATCH] avi metadata conv table

Michael Niedermayer michaelni
Fri Feb 5 20:48:53 CET 2010


On Fri, Feb 05, 2010 at 08:36:56PM +0100, Anton Khirnov wrote:
> On Fri, Feb 05, 2010 at 07:43:22PM +0100, Michael Niedermayer wrote:
> > 
> > char key[5]={0}
> > AV_WL32(key, tag);
> > (simpler IMHO)
> > 
> done
> > 
> > nothing in there uses AVFormatContext thus the changes is pointless
> > 
> right, fixed
> > 
> > [...]
> > > @@ -378,15 +366,13 @@ static int avi_write_header(AVFormatContext *s)
> > >  
> > >      list2 = ff_start_tag(pb, "LIST");
> > >      put_tag(pb, "INFO");
> > > -    avi_write_info_tag2(s, NULL, "INAM", "Title", NULL);
> > > -    avi_write_info_tag2(s, NULL, "IART", "Artist", "Author");
> > > -    avi_write_info_tag2(s, NULL, "ICOP", "Copyright", NULL);
> > > -    avi_write_info_tag2(s, NULL, "ICMT", "Comment", NULL);
> > > -    avi_write_info_tag2(s, NULL, "IPRD", "Album", NULL);
> > > -    avi_write_info_tag2(s, NULL, "IGNR", "Genre", NULL);
> > > -    avi_write_info_tag2(s, NULL, "IPRT", "Track", NULL);
> > 
> > > -    if(!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
> > > -        avi_write_info_tag(pb, "ISFT", LIBAVFORMAT_IDENT);
> > 
> > you seem to be loosing this in your patch
> > 
> fixed
> 
> btw i was wondering if it really belongs here and not in the client app.

it absolutely belongs in the muxer

[...]
> @@ -242,12 +242,23 @@ static int avi_read_tag(AVFormatContext *s, AVStream *st, const char *key, unsig
>      get_buffer(pb, value, size);
>      value[size]=0;
>  
> +    AV_WL32(key, tag);
> +
>      if(st)

>          return av_metadata_set2(&st->metadata, key, value,
> -                                    AV_METADATA_DONT_STRDUP_VAL);
> +                                AV_METADATA_DONT_STRDUP_VAL);
>      else
> -    return av_metadata_set2(&s->metadata, key, value,
> -                                  AV_METADATA_DONT_STRDUP_VAL);
> +        return av_metadata_set2(&s->metadata, key, value,
> +                                AV_METADATA_DONT_STRDUP_VAL);

mixing cosmetics with functional changes

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100205/e092e3d8/attachment.pgp>



More information about the ffmpeg-devel mailing list