[FFmpeg-devel] [PATCH] use new metadata API in asf muxer
Aurelien Jacobs
aurel
Wed Feb 4 02:40:57 CET 2009
Michael Niedermayer wrote:
> 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);
That looks nicer, thanks :-)
> ok except that assuming reg tests pass
Applied.
Aurel
More information about the ffmpeg-devel
mailing list