1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

simplify dpcm decoders declaration using a macro

Originally committed as revision 10898 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2007-11-01 16:04:30 +00:00
parent e916de2c8d
commit ad8df79b1d

View File

@ -294,46 +294,19 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
return buf_size; return buf_size;
} }
AVCodec roq_dpcm_decoder = { #define DPCM_DECODER(id, name) \
"roq_dpcm", AVCodec name ## _decoder = { \
CODEC_TYPE_AUDIO, #name, \
CODEC_ID_ROQ_DPCM, CODEC_TYPE_AUDIO, \
sizeof(DPCMContext), id, \
dpcm_decode_init, sizeof(DPCMContext), \
NULL, dpcm_decode_init, \
NULL, NULL, \
dpcm_decode_frame, NULL, \
dpcm_decode_frame, \
}; };
AVCodec interplay_dpcm_decoder = { DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm);
"interplay_dpcm", DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm);
CODEC_TYPE_AUDIO, DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm);
CODEC_ID_INTERPLAY_DPCM, DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_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,
};