From 62e3d01cc7f2d93df75d2f1a186b6f13c94b1cb4 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 7 Jun 2021 16:13:33 +0200 Subject: [PATCH] avcodec/adpcmenc: Deduplicate AVClasses The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt --- libavcodec/adpcmenc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 244a562d41..ea9f76ab2b 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -982,14 +982,14 @@ static const AVOption options[] = { { NULL } }; +static const AVClass adpcm_encoder_class = { + .class_name = "ADPCM encoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + #define ADPCM_ENCODER(id_, name_, sample_fmts_, capabilities_, long_name_) \ -static const AVClass name_ ## _encoder_class = { \ - .class_name = #name_, \ - .item_name = av_default_item_name, \ - .option = options, \ - .version = LIBAVUTIL_VERSION_INT, \ -}; \ - \ const AVCodec ff_ ## name_ ## _encoder = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ @@ -1002,7 +1002,7 @@ const AVCodec ff_ ## name_ ## _encoder = { \ .sample_fmts = sample_fmts_, \ .capabilities = capabilities_ | AV_CODEC_CAP_DR1, \ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \ - .priv_class = &name_ ## _encoder_class, \ + .priv_class = &adpcm_encoder_class, \ } ADPCM_ENCODER(AV_CODEC_ID_ADPCM_ARGO, adpcm_argo, sample_fmts_p, 0, "ADPCM Argonaut Games");