diff mbox series

[FFmpeg-devel,22/41] avcodec/ac3dec_float: Deduplicate AVClasses

Message ID VI1PR0301MB215901335860FE3CBF8B524C8F0E9@VI1PR0301MB2159.eurprd03.prod.outlook.com
State Accepted
Commit 9a1a82d21c8a6145b9a9428eb6dabd1d28fcb626
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/ac3dec_float.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/ac3dec_float.c b/libavcodec/ac3dec_float.c
index 3aa6482b1a..573fbe75b6 100644
--- a/libavcodec/ac3dec_float.c
+++ b/libavcodec/ac3dec_float.c
@@ -46,8 +46,8 @@  static const AVOption options[] = {
     { NULL},
 };
 
-static const AVClass ac3_decoder_class = {
-    .class_name = "AC3 decoder",
+static const AVClass ac3_eac3_decoder_class = {
+    .class_name = "(E-)AC3 decoder",
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
@@ -66,18 +66,11 @@  const AVCodec ff_ac3_decoder = {
     .long_name      = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
-    .priv_class     = &ac3_decoder_class,
+    .priv_class     = &ac3_eac3_decoder_class,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
 };
 
 #if CONFIG_EAC3_DECODER
-static const AVClass eac3_decoder_class = {
-    .class_name = "E-AC3 decoder",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-};
-
 const AVCodec ff_eac3_decoder = {
     .name           = "eac3",
     .type           = AVMEDIA_TYPE_AUDIO,
@@ -91,7 +84,7 @@  const AVCodec ff_eac3_decoder = {
     .long_name      = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
-    .priv_class     = &eac3_decoder_class,
+    .priv_class     = &ac3_eac3_decoder_class,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
 };
 #endif