summaryrefslogtreecommitdiff
path: root/libavcodec/libgsm.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-07-17 12:54:31 +0200
committerAnton Khirnov <anton@khirnov.net>2011-07-29 08:42:34 +0200
commitec6402b7c595c3ceed6d1b8c1b75c6aa8336e052 (patch)
treeb0ac16ae01c2bb355766ae164a1b44fc88617750 /libavcodec/libgsm.c
parent3ad168412600e16dfaa4b41b21322a82a8535990 (diff)
lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
Diffstat (limited to 'libavcodec/libgsm.c')
-rw-r--r--libavcodec/libgsm.c54
1 files changed, 24 insertions, 30 deletions
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"),
};