diff mbox series

[FFmpeg-devel,08/41] avformat/g726: Deduplicate AVClasses

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

Patch

diff --git a/libavformat/g726.c b/libavformat/g726.c
index 01d92e1d6d..4b08d0a9f7 100644
--- a/libavformat/g726.c
+++ b/libavformat/g726.c
@@ -65,33 +65,26 @@  static const AVOption options[] = {
     { NULL },
 };
 
-#if CONFIG_G726_DEMUXER
-static const AVClass g726le_demuxer_class = {
-    .class_name     = "G.726 big-endian demuxer",
+static const AVClass g726_demuxer_class = {
+    .class_name     = "G.726 demuxer",
     .item_name      = av_default_item_name,
     .option         = options,
     .version        = LIBAVUTIL_VERSION_INT,
 };
 
+#if CONFIG_G726_DEMUXER
 const AVInputFormat ff_g726_demuxer = {
     .name           = "g726",
     .long_name      = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left aligned\")"),
     .read_header    = g726_read_header,
     .read_packet    = g726_read_packet,
     .priv_data_size = sizeof(G726Context),
-    .priv_class     = &g726le_demuxer_class,
+    .priv_class     = &g726_demuxer_class,
     .raw_codec_id   = AV_CODEC_ID_ADPCM_G726,
 };
 #endif
 
 #if CONFIG_G726LE_DEMUXER
-static const AVClass g726_demuxer_class = {
-    .class_name     = "G.726 little-endian demuxer",
-    .item_name      = av_default_item_name,
-    .option         = options,
-    .version        = LIBAVUTIL_VERSION_INT,
-};
-
 const AVInputFormat ff_g726le_demuxer = {
     .name           = "g726le",
     .long_name      = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right aligned\")"),