diff mbox series

[FFmpeg-devel,03/41] avformat/aptxdec: Deduplicate AVClasses

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

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>
---
 libavformat/aptxdec.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/aptxdec.c b/libavformat/aptxdec.c
index dca76ae117..7153e262a1 100644
--- a/libavformat/aptxdec.c
+++ b/libavformat/aptxdec.c
@@ -87,14 +87,14 @@  static const AVOption aptx_options[] = {
     { NULL },
 };
 
-#if CONFIG_APTX_DEMUXER
 static const AVClass aptx_demuxer_class = {
-    .class_name = "aptx demuxer",
+    .class_name = "aptx (hd) demuxer",
     .item_name  = av_default_item_name,
     .option     = aptx_options,
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
+#if CONFIG_APTX_DEMUXER
 const AVInputFormat ff_aptx_demuxer = {
     .name           = "aptx",
     .long_name      = NULL_IF_CONFIG_SMALL("raw aptX"),
@@ -108,13 +108,6 @@  const AVInputFormat ff_aptx_demuxer = {
 #endif
 
 #if CONFIG_APTX_HD_DEMUXER
-static const AVClass aptx_hd_demuxer_class = {
-    .class_name = "aptx hd demuxer",
-    .item_name  = av_default_item_name,
-    .option     = aptx_options,
-    .version    = LIBAVUTIL_VERSION_INT,
-};
-
 const AVInputFormat ff_aptx_hd_demuxer = {
     .name           = "aptx_hd",
     .long_name      = NULL_IF_CONFIG_SMALL("raw aptX HD"),
@@ -123,6 +116,6 @@  const AVInputFormat ff_aptx_hd_demuxer = {
     .read_header    = aptx_hd_read_header,
     .read_packet    = aptx_hd_read_packet,
     .flags          = AVFMT_GENERIC_INDEX,
-    .priv_class     = &aptx_hd_demuxer_class,
+    .priv_class     = &aptx_demuxer_class,
 };
 #endif