# HG changeset patch # User gpoirier # Date 1130331070 0 # Node ID d22a3556292a893f7ac97bbea67620af5839aac3 # Parent 1443b4d3f4ab801951ff5a707f768b2a6877d6d6 avoid the registration of DECODERS if only CONFIG_DECODERS is not defined. patch by Emiliano Parassassi < millallo AH tiscali -- it > Original thread: Date: Mon, 24 Oct 2005 13:03:01 +0200 Subject: [Ffmpeg-devel] [PATCH] avoid registration of decoders if only encoders are choosed diff -r 1443b4d3f4ab -r d22a3556292a allcodecs.c --- a/allcodecs.c Wed Oct 26 03:58:06 2005 +0000 +++ b/allcodecs.c Wed Oct 26 12:51:10 2005 +0000 @@ -189,13 +189,10 @@ #ifdef CONFIG_LIBGSM register_avcodec(&libgsm_encoder); #endif //CONFIG_LIBGSM -#endif /* CONFIG_ENCODERS */ #ifdef CONFIG_RAWVIDEO_ENCODER register_avcodec(&rawvideo_encoder); #endif //CONFIG_RAWVIDEO_ENCODER -#ifdef CONFIG_RAWVIDEO_DECODER - register_avcodec(&rawvideo_decoder); -#endif //CONFIG_RAWVIDEO_DECODER +#endif /* CONFIG_ENCODERS */ /* decoders */ #ifdef CONFIG_DECODERS @@ -494,6 +491,9 @@ #ifdef CONFIG_QDM2_DECODER register_avcodec(&qdm2_decoder); #endif //CONFIG_QDM2_DECODER +#ifdef CONFIG_RAWVIDEO_DECODER + register_avcodec(&rawvideo_decoder); +#endif //CONFIG_RAWVIDEO_DECODER #endif /* CONFIG_DECODERS */ #ifdef AMR_NB @@ -519,15 +519,16 @@ #endif /* AMR_WB */ /* pcm codecs */ - -#ifdef CONFIG_ENCODERS -#define PCM_CODEC(id, name) \ - register_avcodec(& name ## _encoder); \ - register_avcodec(& name ## _decoder); \ - -#else -#define PCM_CODEC(id, name) \ - register_avcodec(& name ## _decoder); +#if defined (CONFIG_ENCODERS) && defined (CONFIG_DECODERS) + #define PCM_CODEC(id, name) \ + register_avcodec(& name ## _encoder); \ + register_avcodec(& name ## _decoder); +#elif defined (CONFIG_ENCODERS) + #define PCM_CODEC(id, name) \ + register_avcodec(& name ## _encoder); +#elif defined (CONFIG_DECODERS) + #define PCM_CODEC(id, name) \ + register_avcodec(& name ## _decoder); #endif PCM_CODEC(CODEC_ID_PCM_S32LE, pcm_s32le); @@ -564,13 +565,17 @@ PCM_CODEC(CODEC_ID_ADPCM_CT, adpcm_ct); PCM_CODEC(CODEC_ID_ADPCM_SWF, adpcm_swf); PCM_CODEC(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha); - #undef PCM_CODEC - /* subtitles */ + /* subtitles */ +#ifdef CONFIG_ENCODERS + register_avcodec(&dvbsub_encoder); +#endif + +#ifdef CONFIG_DECODERS register_avcodec(&dvdsub_decoder); - register_avcodec(&dvbsub_encoder); register_avcodec(&dvbsub_decoder); +#endif /* parsers */ av_register_codec_parser(&mpegvideo_parser);