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

Aurelien Jacobs aurel
Tue Feb 3 23:12:26 CET 2009


Michael Niedermayer wrote:

> 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

Applied.

Aurel




More information about the ffmpeg-devel mailing list