[FFmpeg-devel] [PATCH] use new metadata API in asf muxer

Michael Niedermayer michaelni
Wed Feb 4 02:13:11 CET 2009


On Tue, Feb 03, 2009 at 11:10:29PM +0100, Aurelien Jacobs wrote:
> Ronald S. Bultje wrote:
> 
> > Hi Aurel,
> > 
> > On Mon, Feb 2, 2009 at 6:02 PM, Aurelien Jacobs <aurel at gnuage.org> wrote:
> > > This patch uses new metadata API in asf muxer.
> > > Note that metadata is now exported in extended_content_header instead of
> > > comment_header to allow writing random metadata instead of only the few
> > > one allowed by comment_header.
> > 
> > Most asf streams I've seen do use comment_header for the "basic" tags
> > and extended_content_header for these not supported by comment_header.
> > Can't you do that?
> 
> Indeed that would certainly be better. And this way, basic metadata would
> still be available to basic players which only read comment_header.
> 
> Attached a new version of the patch split in 2 part. The first part simply
> convert current code to new metadata API. So it still only write a few
> basic tags in comment_header.
> Second patch adds writing of all available metadata tags in
> extended_content_header.
[...]
> @@ -327,15 +333,15 @@
>      /* title and other infos */
>      if (has_title) {
>          hpos = put_header(pb, &comment_header);
> -        if ( s->title[0]     ) { put_le16(pb, 2 * (strlen(s->title    ) + 1)); } else { put_le16(pb, 0); }
> -        if ( s->author[0]    ) { put_le16(pb, 2 * (strlen(s->author   ) + 1)); } else { put_le16(pb, 0); }
> -        if ( s->copyright[0] ) { put_le16(pb, 2 * (strlen(s->copyright) + 1)); } else { put_le16(pb, 0); }
> -        if ( s->comment[0]   ) { put_le16(pb, 2 * (strlen(s->comment  ) + 1)); } else { put_le16(pb, 0); }

> +        if (title    ) { put_le16(pb, 2 * (strlen(title->value    ) + 1)); } else { put_le16(pb, 0); }

put_le16(pb, title ? 2 * (strlen(title->value    ) + 1) : 0);

ok except that assuming reg tests pass

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

There will always be a question for which you do not know the correct awnser.
-------------- 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/20090204/79960831/attachment.pgp>



More information about the ffmpeg-devel mailing list