From ec6402b7c595c3ceed6d1b8c1b75c6aa8336e052 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 17 Jul 2011 12:54:31 +0200 Subject: lavc: use designated initialisers for all codecs. It's more readable and less prone to breakage. --- libavcodec/libgsm.c | 54 ++++++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) (limited to 'libavcodec/libgsm.c') diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c index 0573cb33d6..8115d28d77 100644 --- a/libavcodec/libgsm.c +++ b/libavcodec/libgsm.c @@ -113,25 +113,23 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVCodec ff_libgsm_encoder = { - "libgsm", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM, - 0, - libgsm_init, - libgsm_encode_frame, - libgsm_close, + .name = "libgsm", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM, + .init = libgsm_init, + .encode = libgsm_encode_frame, + .close = libgsm_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; AVCodec ff_libgsm_ms_encoder = { - "libgsm_ms", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM_MS, - 0, - libgsm_init, - libgsm_encode_frame, - libgsm_close, + .name = "libgsm_ms", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM_MS, + .init = libgsm_init, + .encode = libgsm_encode_frame, + .close = libgsm_close, .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; @@ -157,25 +155,21 @@ static int libgsm_decode_frame(AVCodecContext *avctx, } AVCodec ff_libgsm_decoder = { - "libgsm", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM, - 0, - libgsm_init, - NULL, - libgsm_close, - libgsm_decode_frame, + .name = "libgsm", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM, + .init = libgsm_init, + .close = libgsm_close, + .decode = libgsm_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"), }; AVCodec ff_libgsm_ms_decoder = { - "libgsm_ms", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_GSM_MS, - 0, - libgsm_init, - NULL, - libgsm_close, - libgsm_decode_frame, + .name = "libgsm_ms", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_GSM_MS, + .init = libgsm_init, + .close = libgsm_close, + .decode = libgsm_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"), }; -- cgit v1.2.1