summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-07 16:13:33 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-22 07:50:05 +0200
commit62e3d01cc7f2d93df75d2f1a186b6f13c94b1cb4 (patch)
treeef2289c38be3e33239fd8720532752d3ac37b364
parent63f736f47667e5106c38ed4083fc22ebb807225b (diff)
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 <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/adpcmenc.c16
1 files 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");