Skip to content

Commit 08bebeb

Browse files
committed
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 0c6203c.
1 parent a8bc79c commit 08bebeb

File tree

363 files changed

+408
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

363 files changed

+408
-0
lines changed

fftools/ffmpeg_mux_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,6 +2218,7 @@ static int of_parse_group_token(Muxer *mux, const char *token, char *ptr)
22182218
};
22192219
const AVClass class = {
22202220
.class_name = "StreamGroupType",
2221+
.item_name = av_default_item_name,
22212222
.option = opts,
22222223
.version = LIBAVUTIL_VERSION_INT,
22232224
};

fftools/ffmpeg_opt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ static int opt_abort_on(void *optctx, const char *opt, const char *arg)
335335
};
336336
static const AVClass class = {
337337
.class_name = "",
338+
.item_name = av_default_item_name,
338339
.option = opts,
339340
.version = LIBAVUTIL_VERSION_INT,
340341
};

fftools/ffplay_renderer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ static void destroy(VkRenderer *renderer)
776776

777777
static const AVClass vulkan_renderer_class = {
778778
.class_name = "Vulkan Renderer",
779+
.item_name = av_default_item_name,
779780
.version = LIBAVUTIL_VERSION_INT,
780781
};
781782

fftools/opt_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,7 @@ int opt_cpucount(void *optctx, const char *opt, const char *arg)
10691069
};
10701070
static const AVClass class = {
10711071
.class_name = "cpucount",
1072+
.item_name = av_default_item_name,
10721073
.option = opts,
10731074
.version = LIBAVUTIL_VERSION_INT,
10741075
};

libavcodec/aacdec_template.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,6 +3447,7 @@ static const AVOption options[] = {
34473447

34483448
static const AVClass aac_decoder_class = {
34493449
.class_name = "AAC decoder",
3450+
.item_name = av_default_item_name,
34503451
.option = options,
34513452
.version = LIBAVUTIL_VERSION_INT,
34523453
};

libavcodec/aacenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,7 @@ static const AVOption aacenc_options[] = {
14071407

14081408
static const AVClass aacenc_class = {
14091409
.class_name = "AAC encoder",
1410+
.item_name = av_default_item_name,
14101411
.option = aacenc_options,
14111412
.version = LIBAVUTIL_VERSION_INT,
14121413
};

libavcodec/ac3dec_fixed.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ static const AVOption options[] = {
165165

166166
static const AVClass ac3_decoder_class = {
167167
.class_name = "Fixed-Point AC-3 Decoder",
168+
.item_name = av_default_item_name,
168169
.option = options,
169170
.version = LIBAVUTIL_VERSION_INT,
170171
};

libavcodec/ac3dec_float.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ static const AVOption options[] = {
5656

5757
static const AVClass ac3_eac3_decoder_class = {
5858
.class_name = "(E-)AC3 decoder",
59+
.item_name = av_default_item_name,
5960
.option = options,
6061
.version = LIBAVUTIL_VERSION_INT,
6162
};

libavcodec/ac3enc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ const AVOption ff_ac3_enc_options[] = {
130130

131131
const AVClass ff_ac3enc_class = {
132132
.class_name = "AC-3 Encoder",
133+
.item_name = av_default_item_name,
133134
.option = ff_ac3_enc_options,
134135
.version = LIBAVUTIL_VERSION_INT,
135136
};

libavcodec/adpcmenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ static const AVOption options[] = {
989989

990990
static const AVClass adpcm_encoder_class = {
991991
.class_name = "ADPCM encoder",
992+
.item_name = av_default_item_name,
992993
.option = options,
993994
.version = LIBAVUTIL_VERSION_INT,
994995
};

libavcodec/alac.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ static const AVOption options[] = {
611611

612612
static const AVClass alac_class = {
613613
.class_name = "alac",
614+
.item_name = av_default_item_name,
614615
.option = options,
615616
.version = LIBAVUTIL_VERSION_INT,
616617
};

libavcodec/alacenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ static const AVOption options[] = {
643643

644644
static const AVClass alacenc_class = {
645645
.class_name = "alacenc",
646+
.item_name = av_default_item_name,
646647
.option = options,
647648
.version = LIBAVUTIL_VERSION_INT,
648649
};

libavcodec/amfenc_av1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ static const FFCodecDefault defaults[] = {
465465

466466
static const AVClass av1_amf_class = {
467467
.class_name = "av1_amf",
468+
.item_name = av_default_item_name,
468469
.option = options,
469470
.version = LIBAVUTIL_VERSION_INT,
470471
};

libavcodec/amfenc_h264.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ static const FFCodecDefault defaults[] = {
518518

519519
static const AVClass h264_amf_class = {
520520
.class_name = "h264_amf",
521+
.item_name = av_default_item_name,
521522
.option = options,
522523
.version = LIBAVUTIL_VERSION_INT,
523524
};

libavcodec/amfenc_hevc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ static const FFCodecDefault defaults[] = {
433433
};
434434
static const AVClass hevc_amf_class = {
435435
.class_name = "hevc_amf",
436+
.item_name = av_default_item_name,
436437
.option = options,
437438
.version = LIBAVUTIL_VERSION_INT,
438439
};

libavcodec/apedec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,7 @@ static const AVOption options[] = {
17441744

17451745
static const AVClass ape_decoder_class = {
17461746
.class_name = "APE decoder",
1747+
.item_name = av_default_item_name,
17471748
.option = options,
17481749
.version = LIBAVUTIL_VERSION_INT,
17491750
};

libavcodec/audiotoolboxenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ static const AVOption options[] = {
610610
#define FFAT_ENC_CLASS(NAME) \
611611
static const AVClass ffat_##NAME##_enc_class = { \
612612
.class_name = "at_" #NAME "_enc", \
613+
.item_name = av_default_item_name, \
613614
.option = options, \
614615
.version = LIBAVUTIL_VERSION_INT, \
615616
};

libavcodec/av1_metadata_bsf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ static const AVOption av1_metadata_options[] = {
211211

212212
static const AVClass av1_metadata_class = {
213213
.class_name = "av1_metadata_bsf",
214+
.item_name = av_default_item_name,
214215
.option = av1_metadata_options,
215216
.version = LIBAVUTIL_VERSION_INT,
216217
};

libavcodec/av1dec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,7 @@ static const AVOption av1_options[] = {
14851485

14861486
static const AVClass av1_class = {
14871487
.class_name = "AV1 decoder",
1488+
.item_name = av_default_item_name,
14881489
.option = av1_options,
14891490
.version = LIBAVUTIL_VERSION_INT,
14901491
};

libavcodec/cbs_av1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,7 @@ static const AVOption cbs_av1_options[] = {
12771277

12781278
static const AVClass cbs_av1_class = {
12791279
.class_name = "cbs_av1",
1280+
.item_name = av_default_item_name,
12801281
.option = cbs_av1_options,
12811282
.version = LIBAVUTIL_VERSION_INT,
12821283
};

libavcodec/ccaption_dec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@ static const AVOption options[] = {
934934

935935
static const AVClass ccaption_dec_class = {
936936
.class_name = "Closed caption Decoder",
937+
.item_name = av_default_item_name,
937938
.option = options,
938939
.version = LIBAVUTIL_VERSION_INT,
939940
};

libavcodec/cfhdenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ static const AVOption options[] = {
849849

850850
static const AVClass cfhd_class = {
851851
.class_name = "cfhd",
852+
.item_name = av_default_item_name,
852853
.option = options,
853854
.version = LIBAVUTIL_VERSION_INT,
854855
};

libavcodec/cinepakenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ static const AVOption options[] = {
148148

149149
static const AVClass cinepak_class = {
150150
.class_name = "cinepak",
151+
.item_name = av_default_item_name,
151152
.option = options,
152153
.version = LIBAVUTIL_VERSION_INT,
153154
};

libavcodec/cljrenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ static const AVOption options[] = {
103103

104104
static const AVClass cljr_class = {
105105
.class_name = "cljr encoder",
106+
.item_name = av_default_item_name,
106107
.option = options,
107108
.version = LIBAVUTIL_VERSION_INT,
108109
};

libavcodec/crystalhd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ static int crystalhd_receive_frame(AVCodecContext *avctx, AVFrame *frame)
778778
#define DEFINE_CRYSTALHD_DECODER(x, X, bsf_name) \
779779
static const AVClass x##_crystalhd_class = { \
780780
.class_name = #x "_crystalhd", \
781+
.item_name = av_default_item_name, \
781782
.option = options, \
782783
.version = LIBAVUTIL_VERSION_INT, \
783784
}; \

libavcodec/cuviddec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,7 @@ static const AVCodecHWConfigInternal *const cuvid_hw_configs[] = {
11551155
#define DEFINE_CUVID_CODEC(x, X, bsf_name) \
11561156
static const AVClass x##_cuvid_class = { \
11571157
.class_name = #x "_cuvid", \
1158+
.item_name = av_default_item_name, \
11581159
.option = options, \
11591160
.version = LIBAVUTIL_VERSION_INT, \
11601161
}; \

libavcodec/dcadec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ static const AVOption dcadec_options[] = {
410410

411411
static const AVClass dcadec_class = {
412412
.class_name = "DCA decoder",
413+
.item_name = av_default_item_name,
413414
.option = dcadec_options,
414415
.version = LIBAVUTIL_VERSION_INT,
415416
.category = AV_CLASS_CATEGORY_DECODER,

libavcodec/dcaenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,7 @@ static const AVOption options[] = {
13001300

13011301
static const AVClass dcaenc_class = {
13021302
.class_name = "DCA (DTS Coherent Acoustics)",
1303+
.item_name = av_default_item_name,
13031304
.option = options,
13041305
.version = LIBAVUTIL_VERSION_INT,
13051306
};

libavcodec/dnxhdenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ static const AVOption options[] = {
7373

7474
static const AVClass dnxhd_class = {
7575
.class_name = "dnxhd",
76+
.item_name = av_default_item_name,
7677
.option = options,
7778
.version = LIBAVUTIL_VERSION_INT,
7879
};

libavcodec/dolby_e.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,7 @@ static const AVOption options[] = {
13001300

13011301
static const AVClass dolby_e_decoder_class = {
13021302
.class_name = "Dolby E decoder",
1303+
.item_name = av_default_item_name,
13031304
.option = options,
13041305
.version = LIBAVUTIL_VERSION_INT,
13051306
};

libavcodec/dump_extradata_bsf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ static const AVOption options[] = {
9393

9494
static const AVClass dump_extradata_class = {
9595
.class_name = "dump_extradata bsf",
96+
.item_name = av_default_item_name,
9697
.option = options,
9798
.version = LIBAVUTIL_VERSION_INT,
9899
};

libavcodec/dv_error_marker_bsf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ static const AVOption options[] = {
123123

124124
static const AVClass dv_error_marker_class = {
125125
.class_name = "dv_error_marker",
126+
.item_name = av_default_item_name,
126127
.option = options,
127128
.version = LIBAVUTIL_VERSION_INT,
128129
};

libavcodec/dvbsubdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,7 @@ static const AVOption options[] = {
15641564
};
15651565
static const AVClass dvbsubdec_class = {
15661566
.class_name = "DVB Sub Decoder",
1567+
.item_name = av_default_item_name,
15671568
.option = options,
15681569
.version = LIBAVUTIL_VERSION_INT,
15691570
};

libavcodec/dvdsubdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ static const AVOption options[] = {
701701
};
702702
static const AVClass dvdsub_class = {
703703
.class_name = "dvdsubdec",
704+
.item_name = av_default_item_name,
704705
.option = options,
705706
.version = LIBAVUTIL_VERSION_INT,
706707
};

libavcodec/dvdsubenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ static const AVOption options[] = {
496496

497497
static const AVClass dvdsubenc_class = {
498498
.class_name = "VOBSUB subtitle encoder",
499+
.item_name = av_default_item_name,
499500
.option = options,
500501
.version = LIBAVUTIL_VERSION_INT,
501502
};

libavcodec/dvenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ static const AVOption dv_options[] = {
12311231

12321232
static const AVClass dvvideo_encode_class = {
12331233
.class_name = "dvvideo encoder",
1234+
.item_name = av_default_item_name,
12341235
.option = dv_options,
12351236
.version = LIBAVUTIL_VERSION_INT,
12361237
};

libavcodec/eac3enc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
static const AVClass eac3enc_class = {
3737
.class_name = "E-AC-3 Encoder",
38+
.item_name = av_default_item_name,
3839
.option = &ff_ac3_enc_options[2], /* First two options are AC-3 only. */
3940
.version = LIBAVUTIL_VERSION_INT,
4041
};

libavcodec/evrcdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,7 @@ static const AVOption options[] = {
924924

925925
static const AVClass evrcdec_class = {
926926
.class_name = "evrc",
927+
.item_name = av_default_item_name,
927928
.option = options,
928929
.version = LIBAVUTIL_VERSION_INT,
929930
};

libavcodec/exr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,6 +2345,7 @@ static const AVOption options[] = {
23452345

23462346
static const AVClass exr_class = {
23472347
.class_name = "EXR",
2348+
.item_name = av_default_item_name,
23482349
.option = options,
23492350
.version = LIBAVUTIL_VERSION_INT,
23502351
};

libavcodec/exrenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ static const AVOption options[] = {
535535

536536
static const AVClass exr_class = {
537537
.class_name = "exr",
538+
.item_name = av_default_item_name,
538539
.option = options,
539540
.version = LIBAVUTIL_VERSION_INT,
540541
};

libavcodec/extract_extradata_bsf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ static const AVOption options[] = {
457457

458458
static const AVClass extract_extradata_class = {
459459
.class_name = "extract_extradata",
460+
.item_name = av_default_item_name,
460461
.option = options,
461462
.version = LIBAVUTIL_VERSION_INT,
462463
};

libavcodec/ffv1enc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ static const AVOption options[] = {
12631263

12641264
static const AVClass ffv1_class = {
12651265
.class_name = "ffv1 encoder",
1266+
.item_name = av_default_item_name,
12661267
.option = options,
12671268
.version = LIBAVUTIL_VERSION_INT,
12681269
};

libavcodec/fic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ static const AVOption options[] = {
479479

480480
static const AVClass fic_decoder_class = {
481481
.class_name = "FIC decoder",
482+
.item_name = av_default_item_name,
482483
.option = options,
483484
.version = LIBAVUTIL_VERSION_INT,
484485
};

libavcodec/filter_units_bsf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ static const AVOption filter_units_options[] = {
268268

269269
static const AVClass filter_units_class = {
270270
.class_name = "filter_units",
271+
.item_name = av_default_item_name,
271272
.option = filter_units_options,
272273
.version = LIBAVUTIL_VERSION_INT,
273274
};

libavcodec/fitsdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ static const AVOption fits_options[] = {
316316

317317
static const AVClass fits_decoder_class = {
318318
.class_name = "FITS decoder",
319+
.item_name = av_default_item_name,
319320
.option = fits_options,
320321
.version = LIBAVUTIL_VERSION_INT,
321322
.category = AV_CLASS_CATEGORY_DECODER,

libavcodec/flacdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ static const AVOption options[] = {
820820

821821
static const AVClass flac_decoder_class = {
822822
.class_name = "FLAC decoder",
823+
.item_name = av_default_item_name,
823824
.option = options,
824825
.version = LIBAVUTIL_VERSION_INT,
825826
};

libavcodec/flacenc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,7 @@ static const AVOption options[] = {
17431743

17441744
static const AVClass flac_encoder_class = {
17451745
.class_name = "FLAC encoder",
1746+
.item_name = av_default_item_name,
17461747
.option = options,
17471748
.version = LIBAVUTIL_VERSION_INT,
17481749
};

libavcodec/frwu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static const AVOption frwu_options[] = {
110110

111111
static const AVClass frwu_class = {
112112
.class_name = "frwu Decoder",
113+
.item_name = av_default_item_name,
113114
.option = frwu_options,
114115
.version = LIBAVUTIL_VERSION_INT,
115116
};

libavcodec/g722dec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ static const AVOption options[] = {
5151

5252
static const AVClass g722_decoder_class = {
5353
.class_name = "g722 decoder",
54+
.item_name = av_default_item_name,
5455
.option = options,
5556
.version = LIBAVUTIL_VERSION_INT,
5657
};

libavcodec/g723_1dec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ static const AVOption options[] = {
11051105

11061106
static const AVClass g723_1dec_class = {
11071107
.class_name = "G.723.1 decoder",
1108+
.item_name = av_default_item_name,
11081109
.option = options,
11091110
.version = LIBAVUTIL_VERSION_INT,
11101111
};

0 commit comments

Comments
 (0)