Browse Source

Revert "all: Don't set AVClass.item_name to its default value"

Some callers assume that item_name is always set, so this may be
considered an API break.

This reverts commit 0c6203c97a99f69dbaa6e4011d48c331e1111f5e.
Anton Khirnov 1 year ago
parent
commit
08bebeb1be

+ 1 - 0
fftools/ffmpeg_mux_init.c

@@ -2218,6 +2218,7 @@ static int of_parse_group_token(Muxer *mux, const char *token, char *ptr)
     };
     const AVClass class = {
         .class_name = "StreamGroupType",
+        .item_name  = av_default_item_name,
         .option     = opts,
         .version    = LIBAVUTIL_VERSION_INT,
     };

+ 1 - 0
fftools/ffmpeg_opt.c

@@ -335,6 +335,7 @@ static int opt_abort_on(void *optctx, const char *opt, const char *arg)
     };
     static const AVClass class = {
         .class_name = "",
+        .item_name  = av_default_item_name,
         .option     = opts,
         .version    = LIBAVUTIL_VERSION_INT,
     };

+ 1 - 0
fftools/ffplay_renderer.c

@@ -776,6 +776,7 @@ static void destroy(VkRenderer *renderer)
 
 static const AVClass vulkan_renderer_class = {
         .class_name = "Vulkan Renderer",
+        .item_name  = av_default_item_name,
         .version    = LIBAVUTIL_VERSION_INT,
 };
 

+ 1 - 0
fftools/opt_common.c

@@ -1069,6 +1069,7 @@ int opt_cpucount(void *optctx, const char *opt, const char *arg)
     };
     static const AVClass class = {
         .class_name = "cpucount",
+        .item_name  = av_default_item_name,
         .option     = opts,
         .version    = LIBAVUTIL_VERSION_INT,
     };

+ 1 - 0
libavcodec/aacdec_template.c

@@ -3447,6 +3447,7 @@ static const AVOption options[] = {
 
 static const AVClass aac_decoder_class = {
     .class_name = "AAC decoder",
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
 };

+ 1 - 0
libavcodec/aacenc.c

@@ -1407,6 +1407,7 @@ static const AVOption aacenc_options[] = {
 
 static const AVClass aacenc_class = {
     .class_name = "AAC encoder",
+    .item_name  = av_default_item_name,
     .option     = aacenc_options,
     .version    = LIBAVUTIL_VERSION_INT,
 };

+ 1 - 0
libavcodec/ac3dec_fixed.c

@@ -165,6 +165,7 @@ static const AVOption options[] = {
 
 static const AVClass ac3_decoder_class = {
     .class_name = "Fixed-Point AC-3 Decoder",
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
 };

+ 1 - 0
libavcodec/ac3dec_float.c

@@ -56,6 +56,7 @@ static const AVOption options[] = {
 
 static const AVClass ac3_eac3_decoder_class = {
     .class_name = "(E-)AC3 decoder",
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
 };

+ 1 - 0
libavcodec/ac3enc.c

@@ -130,6 +130,7 @@ const AVOption ff_ac3_enc_options[] = {
 
 const AVClass ff_ac3enc_class = {
     .class_name = "AC-3 Encoder",
+    .item_name  = av_default_item_name,
     .option     = ff_ac3_enc_options,
     .version    = LIBAVUTIL_VERSION_INT,
 };

+ 1 - 0
libavcodec/adpcmenc.c

@@ -989,6 +989,7 @@ static const AVOption options[] = {
 
 static const AVClass adpcm_encoder_class = {
     .class_name = "ADPCM encoder",
+    .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
 };

Some files were not shown because too many files changed in this diff