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

Michael Niedermayer michaelni
Fri Jan 1 22:03:56 CET 2010


On Fri, Jan 01, 2010 at 01:32:32PM +0100, Stefano Sabatini wrote:
> On date Friday 2010-01-01 01:35:01 +0100, Michael Niedermayer encoded:
> > On Thu, Dec 31, 2009 at 06:38:10PM +0100, Stefano Sabatini wrote:
> [...]
> > > Index: libavfilter-soc/ffmpeg/libavfilter/formats.c
> > > ===================================================================
> > > --- libavfilter-soc.orig/ffmpeg/libavfilter/formats.c	2009-12-30 01:24:53.000000000 +0100
> > > +++ libavfilter-soc/ffmpeg/libavfilter/formats.c	2009-12-31 18:34:57.000000000 +0100
> > > @@ -85,6 +85,13 @@
> > >      return formats;
> > >  }
> > >  
> > > +void avfilter_add_colorspace(AVFilterFormats *formats, enum PixelFormat pix_fmt)
> > > +{
> > > +    formats->formats = av_realloc(formats->formats,
> > > +                                  sizeof(formats->formats) * ++formats->format_count);
> > > +    formats->formats[formats->format_count-1] = pix_fmt;
> > 
> > ENOMEM checking missing
> 
> Updated.
> -- 
> FFmpeg = Fostering Faboulous Mournful Puristic Eager Gadget

>  avfilter.h |    8 ++++++++
>  formats.c  |   11 +++++++++++
>  2 files changed, 19 insertions(+)
> 2dff8415ba461002514fd9ddee0b178c32a1dc8a  implement-add-colorspace.patch
> 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	2010-01-01 13:10:31.000000000 +0100
> @@ -192,6 +192,14 @@
>  AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts);
>  
>  /**
> + * Adds pix_fmt to the list of formats in formats.
> + *
> + * @return 0 in case of success or AVERROR(ENOMEM) if the formats list
> + * cannot be re-allocated.
> + */

I think ive said it in the past already, plase keep API/ABI in a way that is
not so locked down we need to bump the major version every day.
>= 0 success
<0 error code for example ENOMEM

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

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- 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/20100101/ba28aaca/attachment.pgp>



More information about the ffmpeg-devel mailing list