diff mbox series

[FFmpeg-devel,26/41] avcodec/adpcmenc: Deduplicate AVClasses

Message ID VI1PR0301MB21591DD886CC2CDD484166EC8F0E9@VI1PR0301MB2159.eurprd03.prod.outlook.com
State Accepted
Commit 62e3d01cc7f2d93df75d2f1a186b6f13c94b1cb4
Headers show
Series [FFmpeg-devel,01/41] avformat/Makefile: Add missing rawdec dependency for IPU demuxer | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt June 17, 2021, 2:31 a.m. UTC
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>
---
 libavcodec/adpcmenc.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

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");