diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-06-07 17:13:33 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-08 21:10:17 +0300 |
commit | 01f4f6c2977cc94795761b434b11dde60e52f71b (patch) | |
tree | 61587c3cb7820dc8bacf244b623120166b17a906 /libavcodec/g726.c | |
parent | bc368575a935ace7e898dc0149c672035b07a1c0 (diff) |
avcodec/g726: Deduplicate AVClasses
The child_class_next API relied on different AVCodecs to use
different AVClasses; yet this API has been replaced by
child_class_iterate.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/g726.c')
-rw-r--r-- | libavcodec/g726.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c index 2e053bc5e3..2a0148c1d5 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -382,13 +382,6 @@ static const AVOption options[] = { { NULL }, }; -static const AVCodecDefault defaults[] = { - { "b", "0" }, - { NULL }, -}; -#endif - -#if CONFIG_ADPCM_G726_ENCODER static const AVClass g726_class = { .class_name = "g726", .item_name = av_default_item_name, @@ -396,6 +389,13 @@ static const AVClass g726_class = { .version = LIBAVUTIL_VERSION_INT, }; +static const AVCodecDefault defaults[] = { + { "b", "0" }, + { NULL }, +}; +#endif + +#if CONFIG_ADPCM_G726_ENCODER const AVCodec ff_adpcm_g726_encoder = { .name = "g726", .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"), @@ -414,13 +414,6 @@ const AVCodec ff_adpcm_g726_encoder = { #endif #if CONFIG_ADPCM_G726LE_ENCODER -static const AVClass g726le_class = { - .class_name = "g726le", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - const AVCodec ff_adpcm_g726le_encoder = { .name = "g726le", .long_name = NULL_IF_CONFIG_SMALL("G.726 little endian ADPCM (\"right-justified\")"), @@ -432,7 +425,7 @@ const AVCodec ff_adpcm_g726le_encoder = { .encode2 = g726_encode_frame, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }, - .priv_class = &g726le_class, + .priv_class = &g726_class, .defaults = defaults, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; |