[FFmpeg-devel] [PATCH] Make long_names definition conditional depending on CONFIG_SMALL

Michael Niedermayer michaelni
Sun Jun 8 16:18:59 CEST 2008


On Sat, Jun 07, 2008 at 11:31:54AM +0200, Stefano Sabatini wrote:
> On date Monday 2008-06-02 23:42:10 +0200, Stefano Sabatini encoded:
> > On date Thursday 2008-05-29 18:17:31 +0200, Stefano Sabatini encoded:
> > > On date Thursday 2008-05-29 17:27:59 +0200, Michael Niedermayer encoded:
> > [...]
> > > > what about
> > > > #ifdef CONFIG_SMALL
> > > > #   define NULL_IF_CONFIG_SMALL(x) NULL
> > > > #else
> > > > #   define NULL_IF_CONFIG_SMALL(x) x
> > > > #endif
> > > 
> > > Yes, I prefer this since the same macro may be used in libavformat and
> > > other places as well, but maybe then should it be defined in
> > > libavutil?
> > 
> > Patch updated in order to use the new NULL_IF_CONFIG_SMALL macro
> > defined in libavutil.
> [...]
> > Index: libavcodec/avcodec.h
> > ===================================================================
> > --- libavcodec/avcodec.h	(revision 13630)
> > +++ libavcodec/avcodec.h	(working copy)
> > @@ -2241,7 +2241,11 @@
> >      void (*flush)(AVCodecContext *);
> >      const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}
> >      const enum PixelFormat *pix_fmts;       ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
> > -    const char *long_name;                  ///< descriptive name for the codec, meant to be more human readable than \p name
> > +    /**
> > +     * descriptive name for the codec, meant to be more human readable than \p name
> 
> changed to 
>   +     * descriptive name for the codec, meant to be more human readable than \p name<br>
> 
> > Index: libavcodec/8svx.c
> > ===================================================================
> > --- libavcodec/8svx.c	(revision 13630)
> > +++ libavcodec/8svx.c	(working copy)
> > @@ -96,7 +96,7 @@
> >    .priv_data_size = sizeof (EightSvxContext),
> >    .init           = eightsvx_decode_init,
> >    .decode         = eightsvx_decode_frame,
> > -  .long_name      = "8SVX fibonacci",
> > +  .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
> 
> changed to
>   +  .long_name      = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
> 
> here and below
> 
> >  AVCodec eightsvx_exp_decoder = {
> > @@ -106,5 +106,5 @@
> >    .priv_data_size = sizeof (EightSvxContext),
> >    .init           = eightsvx_decode_init,
> >    .decode         = eightsvx_decode_frame,
> > -  .long_name      = "8SVX exponential",
> > +  .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
> >  };
> 
> [...]
> > Index: libavcodec/asv1.c
> > ===================================================================
> > --- libavcodec/asv1.c	(revision 13630)
> > +++ libavcodec/asv1.c	(working copy)
> > @@ -615,7 +615,7 @@
> >      decode_end,
> >      decode_frame,
> >      CODEC_CAP_DR1,
> > -    .long_name= "ASUS V1",
> > +    .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
> 
> changed to
>   +    .long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
> 
> Fixed here and everywhere all the .long_name=/.long_name =/ spacing
> consistency issues.
> 
> Regards.
> -- 
> FFmpeg = Free & Freak MultiPurpose EnGine

> Index: libavcodec/avcodec.h
> ===================================================================
> --- libavcodec/avcodec.h	(revision 13684)
> +++ libavcodec/avcodec.h	(working copy)
> @@ -2242,7 +2242,11 @@
>      void (*flush)(AVCodecContext *);
>      const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0}
>      const enum PixelFormat *pix_fmts;       ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
> -    const char *long_name;                  ///< descriptive name for the codec, meant to be more human readable than \p name
> +    /**
> +     * descriptive name for the codec, meant to be more human readable than \p name<br>
> +     * You \e should use the NULL_IF_CONFIG_SMALL() macro to define it.
> +     */
> +    const char *long_name;
>      const int *supported_samplerates;       ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
>  } AVCodec;

s/<br>/./


[...]
> -    .long_name = XXX
> +    .long_name = NULL_IF_CONFIG_SMALL(XXX),

ok

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

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- 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/20080608/f252bfd7/attachment.pgp>



More information about the ffmpeg-devel mailing list