[FFmpeg-devel] [PATCH] Implement avfilter_add_colorspaces()

Stefano Sabatini stefano.sabatini-lala
Thu Dec 31 01:48:29 CET 2009


On date Thursday 2009-12-31 01:18:27 +0100, Michael Niedermayer encoded:
> On Wed, Dec 30, 2009 at 01:32:36AM +0100, Stefano Sabatini wrote:
[...]
> > Index: libavfilter-soc/ffmpeg/libavfilter/avfilter.h
> > ===================================================================
> > --- libavfilter-soc.orig/ffmpeg/libavfilter/avfilter.h	2009-12-30 01:24:53.000000000 +0100
> > +++ libavfilter-soc/ffmpeg/libavfilter/avfilter.h	2009-12-30 01:25:01.000000000 +0100
> > @@ -192,6 +192,12 @@
> >  AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts);
> >  
> >  /**
> > + * Adds pix_fmt to the list of formats pointed by formats, and updates
> > + * formats to point to the new updated list.
> > + */
> > +void avfilter_add_colorspace(AVFilterFormats **formats, enum PixelFormat pix_fmt);
> 
> why **formats and not *formats ?

The list of formats is re-allocated, so its address may
change. Alternatively we could have:

AVFilterFormats *avfilter_add_colorspace(AVFilterFormats *formats, enum PixelFormat pix_fmt);

but the first one seems safer to me.

Regards.
-- 
FFmpeg = Freak & Faboulous Multimedia Pitiful Egregious Gargoyle



More information about the ffmpeg-devel mailing list