Commit 0c792029 authored by gpoirier's avatar gpoirier

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4664 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 13a2edf5
...@@ -189,13 +189,10 @@ void avcodec_register_all(void) ...@@ -189,13 +189,10 @@ void avcodec_register_all(void)
#ifdef CONFIG_LIBGSM #ifdef CONFIG_LIBGSM
register_avcodec(&libgsm_encoder); register_avcodec(&libgsm_encoder);
#endif //CONFIG_LIBGSM #endif //CONFIG_LIBGSM
#endif /* CONFIG_ENCODERS */
#ifdef CONFIG_RAWVIDEO_ENCODER #ifdef CONFIG_RAWVIDEO_ENCODER
register_avcodec(&rawvideo_encoder); register_avcodec(&rawvideo_encoder);
#endif //CONFIG_RAWVIDEO_ENCODER #endif //CONFIG_RAWVIDEO_ENCODER
#ifdef CONFIG_RAWVIDEO_DECODER #endif /* CONFIG_ENCODERS */
register_avcodec(&rawvideo_decoder);
#endif //CONFIG_RAWVIDEO_DECODER
/* decoders */ /* decoders */
#ifdef CONFIG_DECODERS #ifdef CONFIG_DECODERS
...@@ -494,6 +491,9 @@ void avcodec_register_all(void) ...@@ -494,6 +491,9 @@ void avcodec_register_all(void)
#ifdef CONFIG_QDM2_DECODER #ifdef CONFIG_QDM2_DECODER
register_avcodec(&qdm2_decoder); register_avcodec(&qdm2_decoder);
#endif //CONFIG_QDM2_DECODER #endif //CONFIG_QDM2_DECODER
#ifdef CONFIG_RAWVIDEO_DECODER
register_avcodec(&rawvideo_decoder);
#endif //CONFIG_RAWVIDEO_DECODER
#endif /* CONFIG_DECODERS */ #endif /* CONFIG_DECODERS */
#ifdef AMR_NB #ifdef AMR_NB
...@@ -519,14 +519,15 @@ void avcodec_register_all(void) ...@@ -519,14 +519,15 @@ void avcodec_register_all(void)
#endif /* AMR_WB */ #endif /* AMR_WB */
/* pcm codecs */ /* pcm codecs */
#if defined (CONFIG_ENCODERS) && defined (CONFIG_DECODERS)
#ifdef CONFIG_ENCODERS #define PCM_CODEC(id, name) \
#define PCM_CODEC(id, name) \
register_avcodec(& name ## _encoder); \ register_avcodec(& name ## _encoder); \
register_avcodec(& name ## _decoder); \ register_avcodec(& name ## _decoder);
#elif defined (CONFIG_ENCODERS)
#else #define PCM_CODEC(id, name) \
#define PCM_CODEC(id, name) \ register_avcodec(& name ## _encoder);
#elif defined (CONFIG_DECODERS)
#define PCM_CODEC(id, name) \
register_avcodec(& name ## _decoder); register_avcodec(& name ## _decoder);
#endif #endif
...@@ -564,13 +565,17 @@ PCM_CODEC(CODEC_ID_ADPCM_G726, adpcm_g726); ...@@ -564,13 +565,17 @@ PCM_CODEC(CODEC_ID_ADPCM_G726, adpcm_g726);
PCM_CODEC(CODEC_ID_ADPCM_CT, adpcm_ct); PCM_CODEC(CODEC_ID_ADPCM_CT, adpcm_ct);
PCM_CODEC(CODEC_ID_ADPCM_SWF, adpcm_swf); PCM_CODEC(CODEC_ID_ADPCM_SWF, adpcm_swf);
PCM_CODEC(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha); PCM_CODEC(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha);
#undef PCM_CODEC #undef PCM_CODEC
/* subtitles */ /* subtitles */
register_avcodec(&dvdsub_decoder); #ifdef CONFIG_ENCODERS
register_avcodec(&dvbsub_encoder); register_avcodec(&dvbsub_encoder);
#endif
#ifdef CONFIG_DECODERS
register_avcodec(&dvdsub_decoder);
register_avcodec(&dvbsub_decoder); register_avcodec(&dvbsub_decoder);
#endif
/* parsers */ /* parsers */
av_register_codec_parser(&mpegvideo_parser); av_register_codec_parser(&mpegvideo_parser);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment