diff options
author | Paul B Mahol <onemda@gmail.com> | 2011-12-30 20:00:53 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-12-30 20:00:53 +0100 |
commit | ba10207bbe5ebd97b5afc3f19baf4a1ad8f974d5 (patch) | |
tree | c5602a20dc46f1f6dc9e555d0d1b1926a17cf210 /libavcodec/sonic.c | |
parent | 73ba2c1e62a870c7d7b27cd8093ef39447a57903 (diff) | |
download | ffmpeg-ba10207bbe5ebd97b5afc3f19baf4a1ad8f974d5.tar.gz |
Use more designated initializers.
Also remove some pointless NULL/0 assigments.
C++ code must be left as it is because named struct
initializers are not supported by C++ standard.
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r-- | libavcodec/sonic.c | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index e7cdb3ba81..71641f95ff 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -936,42 +936,39 @@ static int sonic_decode_frame(AVCodecContext *avctx, } AVCodec ff_sonic_decoder = { - "sonic", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_SONIC, - sizeof(SonicContext), - sonic_decode_init, - NULL, - sonic_decode_close, - sonic_decode_frame, + .name = "sonic", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SONIC, + .priv_data_size = sizeof(SonicContext), + .init = sonic_decode_init, + .close = sonic_decode_close, + .decode = sonic_decode_frame, .long_name = NULL_IF_CONFIG_SMALL("Sonic"), }; #endif /* CONFIG_SONIC_DECODER */ #if CONFIG_SONIC_ENCODER AVCodec ff_sonic_encoder = { - "sonic", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_SONIC, - sizeof(SonicContext), - sonic_encode_init, - sonic_encode_frame, - sonic_encode_close, - NULL, + .name = "sonic", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SONIC, + .priv_data_size = sizeof(SonicContext), + .init = sonic_encode_init, + .encode = sonic_encode_frame, + .close = sonic_encode_close, .long_name = NULL_IF_CONFIG_SMALL("Sonic"), }; #endif #if CONFIG_SONIC_LS_ENCODER AVCodec ff_sonic_ls_encoder = { - "sonicls", - AVMEDIA_TYPE_AUDIO, - CODEC_ID_SONIC_LS, - sizeof(SonicContext), - sonic_encode_init, - sonic_encode_frame, - sonic_encode_close, - NULL, + .name = "sonicls", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_SONIC_LS, + .priv_data_size = sizeof(SonicContext), + .init = sonic_encode_init, + .encode = sonic_encode_frame, + .close = sonic_encode_close, .long_name = NULL_IF_CONFIG_SMALL("Sonic lossless"), }; #endif |