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

Michael Niedermayer michaelni
Tue Feb 3 01:32:49 CET 2009


On Tue, Feb 03, 2009 at 01:19:36AM +0100, Aurelien Jacobs wrote:
> Michael Niedermayer wrote:
> 
> > On Mon, Feb 02, 2009 at 11:59:09PM +0100, Aurelien Jacobs wrote:
> > > Hi,
> > > 
> > > Attached patch uses new the metadata API to export all the metadata tags
> > > read in asf files.
> > > 
> > > Aurel
> > > Index: libavformat/asf.c
> > > ===================================================================
> > > --- libavformat/asf.c	(revision 16909)
> > > +++ libavformat/asf.c	(working copy)
> > > @@ -141,6 +141,25 @@
> > >      }
> > >  }
> > >  
> > > +static void get_tag(AVFormatContext *s, const char *key, int type, int len)
> > > +{
> > 
> > > +    const char *k = key;
> > 
> > redundant ?
> 
> right...
> 
> > > +    char value[1024];
> > 
> > > +    uint64_t num;
> > > +    if (type <= 1) {         // unicode or byte
> > > +        get_str16_nolen(s->pb, len, value, sizeof(value));
> > > +    } else if (type <= 5) {  // boolean or DWORD or QWORD or WORD
> > > +        num = get_value(s->pb, type);
> > 
> > decl & init can be merged
> 
> Indeed.
> Updated patch attached.

looks ok

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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20090203/5fc228e6/attachment.pgp>



More information about the ffmpeg-devel mailing list