summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2003-10-14 04:15:53 +0000
committerMike Melanson <mike@multimedia.cx>2003-10-14 04:15:53 +0000
commit764ef400159b4f640eda8b22e8c7a20d6649a391 (patch)
tree2e359b478a7089f81c973e8153ce653ecadb39a8 /libavcodec/adpcm.c
parenta003ee9a44eca32707eaa049171bc752ba3a9fde (diff)
disable encoders where appropriate (patch courtesy of BERO
<bero -at- geocities.co.jp>) Originally committed as revision 2375 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 84d1e39f77..68a5c6f22f 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -107,6 +107,7 @@ typedef struct ADPCMContext {
/* XXX: implement encoding */
+#ifdef CONFIG_ENCODERS
static int adpcm_encode_init(AVCodecContext *avctx)
{
if (avctx->channels > 2)
@@ -265,6 +266,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx,
}
return dst - frame;
}
+#endif //CONFIG_ENCODERS
static int adpcm_decode_init(AVCodecContext * avctx)
{
@@ -685,7 +687,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
return src - buf;
}
-#define ADPCM_CODEC(id, name) \
+
+
+#ifdef CONFIG_ENCODERS
+#define ADPCM_ENCODER(id,name) \
AVCodec name ## _encoder = { \
#name, \
CODEC_TYPE_AUDIO, \
@@ -695,7 +700,13 @@ AVCodec name ## _encoder = { \
adpcm_encode_frame, \
adpcm_encode_close, \
NULL, \
-}; \
+};
+#else
+#define ADPCM_ENCODER(id,name)
+#endif
+
+#ifdef CONFIG_DECODERS
+#define ADPCM_DECODER(id,name) \
AVCodec name ## _decoder = { \
#name, \
CODEC_TYPE_AUDIO, \
@@ -706,6 +717,12 @@ AVCodec name ## _decoder = { \
NULL, \
adpcm_decode_frame, \
};
+#else
+#define ADPCM_DECODER(id,name)
+#endif
+
+#define ADPCM_CODEC(id, name) \
+ADPCM_ENCODER(id,name) ADPCM_DECODER(id,name)
ADPCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
ADPCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);