diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-06-11 16:40:28 +0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-06-17 04:53:06 +0400 |
commit | 137e80817d00fca7a5f6ff6d4fc672fcfe4ad501 (patch) | |
tree | ff95f61379c6eec9990d17998b64f991c408a670 /libavcodec/libgsm.c | |
parent | 17fad33f81c7e9787fcdc17934fc1eee6c6aa4bf (diff) |
lavc: build some codecs only if they are actually enabled
Saves few bytes if only some of them in same file are enabled.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/libgsm.c')
-rw-r--r-- | libavcodec/libgsm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c index b7d4b54f3c..b2ed15be68 100644 --- a/libavcodec/libgsm.c +++ b/libavcodec/libgsm.c @@ -117,6 +117,7 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } +#if CONFIG_LIBGSM_ENCODER AVCodec ff_libgsm_encoder = { .name = "libgsm", .type = AVMEDIA_TYPE_AUDIO, @@ -128,7 +129,8 @@ AVCodec ff_libgsm_encoder = { AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; - +#endif +#if CONFIG_LIBGSM_MS_ENCODER AVCodec ff_libgsm_ms_encoder = { .name = "libgsm_ms", .type = AVMEDIA_TYPE_AUDIO, @@ -140,6 +142,7 @@ AVCodec ff_libgsm_ms_encoder = { AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; +#endif typedef struct LibGSMDecodeContext { AVFrame frame; @@ -237,6 +240,7 @@ static void libgsm_flush(AVCodecContext *avctx) { gsm_option(s->state, GSM_OPT_WAV49, &one); } +#if CONFIG_LIBGSM_DECODER AVCodec ff_libgsm_decoder = { .name = "libgsm", .type = AVMEDIA_TYPE_AUDIO, @@ -249,7 +253,8 @@ AVCodec ff_libgsm_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; - +#endif +#if CONFIG_LIBGSM_MS_DECODER AVCodec ff_libgsm_ms_decoder = { .name = "libgsm_ms", .type = AVMEDIA_TYPE_AUDIO, @@ -262,3 +267,4 @@ AVCodec ff_libgsm_ms_decoder = { .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; +#endif |