aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-11-01 16:04:30 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-11-01 16:04:30 +0000
commitad8df79b1d67c247c119a78d31225a7b62cbf188 (patch)
tree1cebdefaad37d0e5ae34dde3df75ab225254f2a4 /libavcodec
parente916de2c8dbfdf3c637728552091c2738f777343 (diff)
downloadffmpeg-ad8df79b1d67c247c119a78d31225a7b62cbf188.tar.gz
simplify dpcm decoders declaration using a macro
Originally committed as revision 10898 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dpcm.c55
1 files changed, 14 insertions, 41 deletions
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index c4a127d7c7..53382d6635 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -294,46 +294,19 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-AVCodec roq_dpcm_decoder = {
- "roq_dpcm",
- CODEC_TYPE_AUDIO,
- CODEC_ID_ROQ_DPCM,
- sizeof(DPCMContext),
- dpcm_decode_init,
- NULL,
- NULL,
- dpcm_decode_frame,
+#define DPCM_DECODER(id, name) \
+AVCodec name ## _decoder = { \
+ #name, \
+ CODEC_TYPE_AUDIO, \
+ id, \
+ sizeof(DPCMContext), \
+ dpcm_decode_init, \
+ NULL, \
+ NULL, \
+ dpcm_decode_frame, \
};
-AVCodec interplay_dpcm_decoder = {
- "interplay_dpcm",
- CODEC_TYPE_AUDIO,
- CODEC_ID_INTERPLAY_DPCM,
- sizeof(DPCMContext),
- dpcm_decode_init,
- NULL,
- NULL,
- dpcm_decode_frame,
-};
-
-AVCodec xan_dpcm_decoder = {
- "xan_dpcm",
- CODEC_TYPE_AUDIO,
- CODEC_ID_XAN_DPCM,
- sizeof(DPCMContext),
- dpcm_decode_init,
- NULL,
- NULL,
- dpcm_decode_frame,
-};
-
-AVCodec sol_dpcm_decoder = {
- "sol_dpcm",
- CODEC_TYPE_AUDIO,
- CODEC_ID_SOL_DPCM,
- sizeof(DPCMContext),
- dpcm_decode_init,
- NULL,
- NULL,
- dpcm_decode_frame,
-};
+DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm);
+DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm);
+DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm);
+DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_dpcm);