[FFmpeg-devel] [PATCH] metadata compatibility layer (part1)

Aurelien Jacobs aurel
Tue Jan 6 01:09:31 CET 2009


Michael Niedermayer wrote:

> On Mon, Jan 05, 2009 at 12:35:50PM +0100, Aurelien Jacobs wrote:
> > On Mon, 5 Jan 2009 05:00:37 +0100
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> > > On Mon, Jan 05, 2009 at 01:06:31AM +0100, Aurelien Jacobs wrote:
> > > > Hi,
> > > > 
> > > > Attached patch add a metadata compatibility layer, so that when a user
> > > > application set metadata using old API and try to mux it, the muxer
> > > > (using the new API) will still pick the metadata.
> > > > 
> > > [...]
> > > 
> > > > Index: libavformat/utils.c
> > > > ===================================================================
> > > > --- libavformat/utils.c	(revision 16430)
> > > > +++ libavformat/utils.c	(working copy)
> > > > @@ -2501,6 +2501,10 @@
> > > >              return AVERROR(ENOMEM);
> > > >      }
> > > >  
> > > > +#if LIBAVFORMAT_VERSION_MAJOR < 53
> > > > +    ff_metadata_sync_compat(s);
> > > > +#endif
> > > > +
> > > >      if(s->oformat->write_header){
> > > >          ret = s->oformat->write_header(s);
> > > >          if (ret < 0)
> > > 
> > > any reason why the compat code is not just written directly in here ?
> > 
> > I wanted to avoid cluttering utils.c (which is already big enough) and
> > wanted to keep all the metadata related code together in metadata.c.
> > Doesn't it sound logical? Do you want me to put the compat code directly
> > in utils.c to avoid having a new function ?
> 
> put it where you prefer, its just temporary anyway

Applied.

Aurel




More information about the ffmpeg-devel mailing list