[FFmpeg-cvslog] Use explicit struct initializers for AVCodec declarations.

Diego Biurrun git at videolan.org
Sat Sep 24 22:46:40 CEST 2011


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Sep 23 21:11:15 2011 +0200| [8671488799e7f03d7bc985099b73e18ea519ab39] | committer: Diego Biurrun

Use explicit struct initializers for AVCodec declarations.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8671488799e7f03d7bc985099b73e18ea519ab39
---

 libavcodec/adpcm.c              |   20 +++----
 libavcodec/adpcmenc.c           |   23 ++++----
 libavcodec/dpcm.c               |   20 +++----
 libavcodec/jpeglsenc.c          |   17 +++---
 libavcodec/libopenjpeg.c        |   23 ++++----
 libavcodec/libvorbis.c          |   24 ++++----
 libavcodec/ljpegenc.c           |   16 +++---
 libavcodec/mpegaudiodec.c       |  114 +++++++++++++++++----------------------
 libavcodec/mpegaudiodec_float.c |  114 +++++++++++++++++----------------------
 libavcodec/ra144dec.c           |   19 +++----
 libavcodec/ra144enc.c           |   19 +++----
 libavcodec/ra288.c              |   19 +++----
 libavcodec/roqvideoenc.c        |   21 ++++----
 libavcodec/twinvq.c             |   20 +++----
 libavcodec/wmadec.c             |   44 +++++++--------
 libavcodec/wmaenc.c             |   42 +++++++--------
 16 files changed, 252 insertions(+), 303 deletions(-)

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 3baa07b..5e83e4b 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1086,17 +1086,15 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
 }
 
 
-#define ADPCM_DECODER(id,name,long_name_)       \
-AVCodec ff_ ## name ## _decoder = {             \
-    #name,                                      \
-    AVMEDIA_TYPE_AUDIO,                         \
-    id,                                         \
-    sizeof(ADPCMDecodeContext),                 \
-    adpcm_decode_init,                          \
-    NULL,                                       \
-    NULL,                                       \
-    adpcm_decode_frame,                         \
-    .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
+#define ADPCM_DECODER(id_, name_, long_name_)               \
+AVCodec ff_ ## name_ ## _decoder = {                        \
+    .name           = #name_,                               \
+    .type           = AVMEDIA_TYPE_AUDIO,                   \
+    .id             = id_,                                  \
+    .priv_data_size = sizeof(ADPCMDecodeContext),           \
+    .init           = adpcm_decode_init,                    \
+    .decode         = adpcm_decode_frame,                   \
+    .long_name      = NULL_IF_CONFIG_SMALL(long_name_),     \
 }
 
 /* Note: Do not forget to add new entries to the Makefile as well. */
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 2a117f4..d46a8c9 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -667,18 +667,17 @@ static int adpcm_encode_frame(AVCodecContext *avctx,
 }
 
 
-#define ADPCM_ENCODER(id,name,long_name_)       \
-AVCodec ff_ ## name ## _encoder = {             \
-    #name,                                      \
-    AVMEDIA_TYPE_AUDIO,                         \
-    id,                                         \
-    sizeof(ADPCMEncodeContext),                 \
-    adpcm_encode_init,                          \
-    adpcm_encode_frame,                         \
-    adpcm_encode_close,                         \
-    NULL,                                       \
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, \
-    .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
+#define ADPCM_ENCODER(id_, name_, long_name_)               \
+AVCodec ff_ ## name_ ## _encoder = {                        \
+    .name           = #name_,                               \
+    .type           = AVMEDIA_TYPE_AUDIO,                   \
+    .id             = id_,                                  \
+    .priv_data_size = sizeof(ADPCMEncodeContext),           \
+    .init           = adpcm_encode_init,                    \
+    .encode         = adpcm_encode_frame,                   \
+    .close          = adpcm_encode_close,                   \
+    .sample_fmts    = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, \
+    .long_name      = NULL_IF_CONFIG_SMALL(long_name_),     \
 }
 
 ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index af5bf8a..34c739a 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -298,17 +298,15 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
     return buf_size;
 }
 
-#define DPCM_DECODER(id, name, long_name_)      \
-AVCodec ff_ ## name ## _decoder = {             \
-    #name,                                      \
-    AVMEDIA_TYPE_AUDIO,                         \
-    id,                                         \
-    sizeof(DPCMContext),                        \
-    dpcm_decode_init,                           \
-    NULL,                                       \
-    NULL,                                       \
-    dpcm_decode_frame,                          \
-    .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
+#define DPCM_DECODER(id_, name_, long_name_)                \
+AVCodec ff_ ## name_ ## _decoder = {                        \
+    .name           = #name_,                               \
+    .type           = AVMEDIA_TYPE_AUDIO,                   \
+    .id             = id_,                                  \
+    .priv_data_size = sizeof(DPCMContext),                  \
+    .init           = dpcm_decode_init,                     \
+    .decode         = dpcm_decode_frame,                    \
+    .long_name      = NULL_IF_CONFIG_SMALL(long_name_),     \
 }
 
 DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay");
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index a825cf9..d15269e 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -383,13 +383,12 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) {
 }
 
 AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
-    "jpegls",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_JPEGLS,
-    sizeof(JpeglsContext),
-    encode_init_ls,
-    encode_picture_ls,
-    NULL,
-    .pix_fmts= (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, PIX_FMT_NONE},
-    .long_name= NULL_IF_CONFIG_SMALL("JPEG-LS"),
+    .name           = "jpegls",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_JPEGLS,
+    .priv_data_size = sizeof(JpeglsContext),
+    .init           = encode_init_ls,
+    .encode         = encode_picture_ls,
+    .pix_fmts       = (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, PIX_FMT_NONE},
+    .long_name      = NULL_IF_CONFIG_SMALL("JPEG-LS"),
 };
diff --git a/libavcodec/libopenjpeg.c b/libavcodec/libopenjpeg.c
index 6e9e8fc..42809b9 100644
--- a/libavcodec/libopenjpeg.c
+++ b/libavcodec/libopenjpeg.c
@@ -185,15 +185,14 @@ static av_cold int libopenjpeg_decode_close(AVCodecContext *avctx)
 
 
 AVCodec ff_libopenjpeg_decoder = {
-    "libopenjpeg",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_JPEG2000,
-    sizeof(LibOpenJPEGContext),
-    libopenjpeg_decode_init,
-    NULL,
-    libopenjpeg_decode_close,
-    libopenjpeg_decode_frame,
-    CODEC_CAP_DR1,
-    .max_lowres = 5,
-    .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG based JPEG 2000 decoder"),
-} ;
+    .name           = "libopenjpeg",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_JPEG2000,
+    .priv_data_size = sizeof(LibOpenJPEGContext),
+    .init           = libopenjpeg_decode_init,
+    .close          = libopenjpeg_decode_close,
+    .decode         = libopenjpeg_decode_frame,
+    .capabilities   = CODEC_CAP_DR1,
+    .max_lowres     = 5,
+    .long_name      = NULL_IF_CONFIG_SMALL("OpenJPEG based JPEG 2000 decoder"),
+};
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index 85cb9c5..703f3d5 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -245,15 +245,15 @@ static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) {
 
 
 AVCodec ff_libvorbis_encoder = {
-    "libvorbis",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_VORBIS,
-    sizeof(OggVorbisContext),
-    oggvorbis_encode_init,
-    oggvorbis_encode_frame,
-    oggvorbis_encode_close,
-    .capabilities= CODEC_CAP_DELAY,
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
-    .long_name= NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
-    .priv_class= &class,
-} ;
+    .name           = "libvorbis",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_VORBIS,
+    .priv_data_size = sizeof(OggVorbisContext),
+    .init           = oggvorbis_encode_init,
+    .encode         = oggvorbis_encode_frame,
+    .close          = oggvorbis_encode_close,
+    .capabilities   = CODEC_CAP_DELAY,
+    .sample_fmts    = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
+    .long_name      = NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
+    .priv_class     = &class,
+};
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 56a60c9..6a90338 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -187,12 +187,12 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in
 
 
 AVCodec ff_ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
-    "ljpeg",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_LJPEG,
-    sizeof(MpegEncContext),
-    MPV_encode_init,
-    encode_picture_lossless,
-    MPV_encode_end,
-    .long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"),
+    .name           = "ljpeg",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_LJPEG,
+    .priv_data_size = sizeof(MpegEncContext),
+    .init           = MPV_encode_init,
+    .encode         = encode_picture_lossless,
+    .close          = MPV_encode_end,
+    .long_name      = NULL_IF_CONFIG_SMALL("Lossless JPEG"),
 };
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 033d76e..6f841e8 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -2051,82 +2051,68 @@ static int decode_frame_mp3on4(AVCodecContext * avctx,
 
 #if !CONFIG_FLOAT
 #if CONFIG_MP1_DECODER
-AVCodec ff_mp1_decoder =
-{
-    "mp1",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP1,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    NULL,
-    decode_frame,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
+AVCodec ff_mp1_decoder = {
+    .name           = "mp1",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP1,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
 };
 #endif
 #if CONFIG_MP2_DECODER
-AVCodec ff_mp2_decoder =
-{
-    "mp2",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP2,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    NULL,
-    decode_frame,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
+AVCodec ff_mp2_decoder = {
+    .name           = "mp2",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP2,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
 };
 #endif
 #if CONFIG_MP3_DECODER
-AVCodec ff_mp3_decoder =
-{
-    "mp3",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP3,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    NULL,
-    decode_frame,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
+AVCodec ff_mp3_decoder = {
+    .name           = "mp3",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP3,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
 };
 #endif
 #if CONFIG_MP3ADU_DECODER
-AVCodec ff_mp3adu_decoder =
-{
-    "mp3adu",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP3ADU,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    NULL,
-    decode_frame_adu,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
+AVCodec ff_mp3adu_decoder = {
+    .name           = "mp3adu",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP3ADU,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame_adu,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
 };
 #endif
 #if CONFIG_MP3ON4_DECODER
-AVCodec ff_mp3on4_decoder =
-{
-    "mp3on4",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP3ON4,
-    sizeof(MP3On4DecodeContext),
-    decode_init_mp3on4,
-    NULL,
-    decode_close_mp3on4,
-    decode_frame_mp3on4,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP3onMP4"),
+AVCodec ff_mp3on4_decoder = {
+    .name           = "mp3on4",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP3ON4,
+    .priv_data_size = sizeof(MP3On4DecodeContext),
+    .init           = decode_init_mp3on4,
+    .close          = decode_close_mp3on4,
+    .decode         = decode_frame_mp3on4,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP3onMP4"),
 };
 #endif
 #endif
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c
index 0ff866a..929d727 100644
--- a/libavcodec/mpegaudiodec_float.c
+++ b/libavcodec/mpegaudiodec_float.c
@@ -23,81 +23,67 @@
 #include "mpegaudiodec.c"
 
 #if CONFIG_MP1FLOAT_DECODER
-AVCodec ff_mp1float_decoder =
-{
-    "mp1float",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP1,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    .close = NULL,
-    decode_frame,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
+AVCodec ff_mp1float_decoder = {
+    .name           = "mp1float",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP1,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
 };
 #endif
 #if CONFIG_MP2FLOAT_DECODER
-AVCodec ff_mp2float_decoder =
-{
-    "mp2float",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP2,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    .close = NULL,
-    decode_frame,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
+AVCodec ff_mp2float_decoder = {
+    .name           = "mp2float",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP2,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
 };
 #endif
 #if CONFIG_MP3FLOAT_DECODER
-AVCodec ff_mp3float_decoder =
-{
-    "mp3float",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP3,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    .close = NULL,
-    decode_frame,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
+AVCodec ff_mp3float_decoder = {
+    .name           = "mp3float",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP3,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
 };
 #endif
 #if CONFIG_MP3ADUFLOAT_DECODER
-AVCodec ff_mp3adufloat_decoder =
-{
-    "mp3adufloat",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP3ADU,
-    sizeof(MPADecodeContext),
-    decode_init,
-    NULL,
-    .close = NULL,
-    decode_frame_adu,
-    CODEC_CAP_PARSE_ONLY,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
+AVCodec ff_mp3adufloat_decoder = {
+    .name           = "mp3adufloat",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP3ADU,
+    .priv_data_size = sizeof(MPADecodeContext),
+    .init           = decode_init,
+    .decode         = decode_frame_adu,
+    .capabilities   = CODEC_CAP_PARSE_ONLY,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
 };
 #endif
 #if CONFIG_MP3ON4FLOAT_DECODER
-AVCodec ff_mp3on4float_decoder =
-{
-    "mp3on4float",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_MP3ON4,
-    sizeof(MP3On4DecodeContext),
-    decode_init_mp3on4,
-    NULL,
-    decode_close_mp3on4,
-    decode_frame_mp3on4,
-    .flush= flush,
-    .long_name= NULL_IF_CONFIG_SMALL("MP3onMP4"),
+AVCodec ff_mp3on4float_decoder = {
+    .name           = "mp3on4float",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_MP3ON4,
+    .priv_data_size = sizeof(MP3On4DecodeContext),
+    .init           = decode_init_mp3on4,
+    .close          = decode_close_mp3on4,
+    .decode         = decode_frame_mp3on4,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("MP3onMP4"),
 };
 #endif
diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
index e64b6c2..10c85b7 100644
--- a/libavcodec/ra144dec.c
+++ b/libavcodec/ra144dec.c
@@ -114,15 +114,12 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
     return 20;
 }
 
-AVCodec ff_ra_144_decoder =
-{
-    "real_144",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_RA_144,
-    sizeof(RA144Context),
-    ra144_decode_init,
-    NULL,
-    NULL,
-    ra144_decode_frame,
-    .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
+AVCodec ff_ra_144_decoder = {
+    .name           = "real_144",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_RA_144,
+    .priv_data_size = sizeof(RA144Context),
+    .init           = ra144_decode_init,
+    .decode         = ra144_decode_frame,
+    .long_name      = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
 };
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index 6eab6c3..c475cbc 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -508,14 +508,13 @@ static int ra144_encode_frame(AVCodecContext *avctx, uint8_t *frame,
 }
 
 
-AVCodec ff_ra_144_encoder =
-{
-    "real_144",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_RA_144,
-    sizeof(RA144Context),
-    ra144_encode_init,
-    ra144_encode_frame,
-    ra144_encode_close,
-    .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K) encoder"),
+AVCodec ff_ra_144_encoder = {
+    .name           = "real_144",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_RA_144,
+    .priv_data_size = sizeof(RA144Context),
+    .init           = ra144_encode_init,
+    .encode         = ra144_encode_frame,
+    .close          = ra144_encode_close,
+    .long_name      = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K) encoder"),
 };
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 64d765c..a0b86a2 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -203,15 +203,12 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
     return avctx->block_align;
 }
 
-AVCodec ff_ra_288_decoder =
-{
-    "real_288",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_RA_288,
-    sizeof(RA288Context),
-    ra288_decode_init,
-    NULL,
-    NULL,
-    ra288_decode_frame,
-    .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"),
+AVCodec ff_ra_288_decoder = {
+    .name           = "real_288",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_RA_288,
+    .priv_data_size = sizeof(RA288Context),
+    .init           = ra288_decode_init,
+    .decode         = ra288_decode_frame,
+    .long_name      = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"),
 };
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 052dcef..2a62d55 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -1065,16 +1065,15 @@ static int roq_encode_end(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec ff_roq_encoder =
-{
-    "roqvideo",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_ROQ,
-    sizeof(RoqContext),
-    roq_encode_init,
-    roq_encode_frame,
-    roq_encode_end,
+AVCodec ff_roq_encoder = {
+    .name                 = "roqvideo",
+    .type                 = AVMEDIA_TYPE_VIDEO,
+    .id                   = CODEC_ID_ROQ,
+    .priv_data_size       = sizeof(RoqContext),
+    .init                 = roq_encode_init,
+    .encode               = roq_encode_frame,
+    .close                = roq_encode_end,
     .supported_framerates = (const AVRational[]){{30,1}, {0,0}},
-    .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV444P, PIX_FMT_NONE},
-    .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"),
+    .pix_fmts             = (const enum PixelFormat[]){PIX_FMT_YUV444P, PIX_FMT_NONE},
+    .long_name            = NULL_IF_CONFIG_SMALL("id RoQ video"),
 };
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 86c81a1..1326d22 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -1120,15 +1120,13 @@ static av_cold int twin_decode_close(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec ff_twinvq_decoder =
-{
-    "twinvq",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_TWINVQ,
-    sizeof(TwinContext),
-    twin_decode_init,
-    NULL,
-    twin_decode_close,
-    twin_decode_frame,
-    .long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"),
+AVCodec ff_twinvq_decoder = {
+    .name           = "twinvq",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_TWINVQ,
+    .priv_data_size = sizeof(TwinContext),
+    .init           = twin_decode_init,
+    .close          = twin_decode_close,
+    .decode         = twin_decode_frame,
+    .long_name      = NULL_IF_CONFIG_SMALL("VQF TwinVQ"),
 };
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 479b34c..389bf02 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -916,30 +916,26 @@ static av_cold void flush(AVCodecContext *avctx)
     s->last_superframe_len= 0;
 }
 
-AVCodec ff_wmav1_decoder =
-{
-    "wmav1",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_WMAV1,
-    sizeof(WMACodecContext),
-    wma_decode_init,
-    NULL,
-    ff_wma_end,
-    wma_decode_superframe,
-    .flush=flush,
-    .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
+AVCodec ff_wmav1_decoder = {
+    .name           = "wmav1",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_WMAV1,
+    .priv_data_size = sizeof(WMACodecContext),
+    .init           = wma_decode_init,
+    .close          = ff_wma_end,
+    .decode         = wma_decode_superframe,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
 };
 
-AVCodec ff_wmav2_decoder =
-{
-    "wmav2",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_WMAV2,
-    sizeof(WMACodecContext),
-    wma_decode_init,
-    NULL,
-    ff_wma_end,
-    wma_decode_superframe,
-    .flush=flush,
-    .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
+AVCodec ff_wmav2_decoder = {
+    .name           = "wmav2",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_WMAV2,
+    .priv_data_size = sizeof(WMACodecContext),
+    .init           = wma_decode_init,
+    .close          = ff_wma_end,
+    .decode         = wma_decode_superframe,
+    .flush          = flush,
+    .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
 };
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 3cdb4a0..2abc97a 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -390,28 +390,26 @@ static int encode_superframe(AVCodecContext *avctx,
     return put_bits_ptr(&s->pb) - s->pb.buf;
 }
 
-AVCodec ff_wmav1_encoder =
-{
-    "wmav1",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_WMAV1,
-    sizeof(WMACodecContext),
-    encode_init,
-    encode_superframe,
-    ff_wma_end,
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
-    .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
+AVCodec ff_wmav1_encoder = {
+    .name           = "wmav1",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_WMAV1,
+    .priv_data_size = sizeof(WMACodecContext),
+    .init           = encode_init,
+    .encode         = encode_superframe,
+    .close          = ff_wma_end,
+    .sample_fmts    = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
+    .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
 };
 
-AVCodec ff_wmav2_encoder =
-{
-    "wmav2",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_WMAV2,
-    sizeof(WMACodecContext),
-    encode_init,
-    encode_superframe,
-    ff_wma_end,
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
-    .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
+AVCodec ff_wmav2_encoder = {
+    .name           = "wmav2",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_WMAV2,
+    .priv_data_size = sizeof(WMACodecContext),
+    .init           = encode_init,
+    .encode         = encode_superframe,
+    .close          = ff_wma_end,
+    .sample_fmts    = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
+    .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
 };



More information about the ffmpeg-cvslog mailing list