Skip to content

Commit 65c4d5d

Browse files
committed
tools/enum_options: fix build and add to Makefile
1 parent 5bd870a commit 65c4d5d

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ tools/target_dem_fuzzer$(EXESUF): tools/target_dem_fuzzer.o $(FF_DEP_LIBS)
6262
tools/target_io_dem_fuzzer$(EXESUF): tools/target_io_dem_fuzzer.o $(FF_DEP_LIBS)
6363
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
6464

65+
66+
tools/enum_options$(EXESUF): ELIBS = $(FF_EXTRALIBS)
67+
tools/enum_options$(EXESUF): $(FF_DEP_LIBS)
6568
tools/sofa2wavs$(EXESUF): ELIBS = $(FF_EXTRALIBS)
6669
tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
6770
tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)

tools/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TOOLS = qt-faststart trasher uncoded_frame
1+
TOOLS = enum_options qt-faststart trasher uncoded_frame
22
TOOLS-$(CONFIG_LIBMYSOFA) += sofa2wavs
33
TOOLS-$(CONFIG_ZLIB) += cws2fws
44

tools/enum_options.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ static void print_option(const AVClass *class, const AVOption *o)
4040
{
4141
printf("@item -%s @var{", o->name);
4242
switch (o->type) {
43-
case FF_OPT_TYPE_BINARY: printf("hexadecimal string"); break;
44-
case FF_OPT_TYPE_STRING: printf("string"); break;
45-
case FF_OPT_TYPE_INT:
46-
case FF_OPT_TYPE_INT64: printf("integer"); break;
47-
case FF_OPT_TYPE_FLOAT:
48-
case FF_OPT_TYPE_DOUBLE: printf("float"); break;
49-
case FF_OPT_TYPE_RATIONAL: printf("rational number"); break;
50-
case FF_OPT_TYPE_FLAGS: printf("flags"); break;
43+
case AV_OPT_TYPE_BINARY: printf("hexadecimal string"); break;
44+
case AV_OPT_TYPE_STRING: printf("string"); break;
45+
case AV_OPT_TYPE_INT:
46+
case AV_OPT_TYPE_INT64: printf("integer"); break;
47+
case AV_OPT_TYPE_FLOAT:
48+
case AV_OPT_TYPE_DOUBLE: printf("float"); break;
49+
case AV_OPT_TYPE_RATIONAL: printf("rational number"); break;
50+
case AV_OPT_TYPE_FLAGS: printf("flags"); break;
5151
default: printf("value"); break;
5252
}
5353
printf("} (@emph{");
@@ -68,8 +68,8 @@ static void print_option(const AVClass *class, const AVOption *o)
6868
const AVOption *u = NULL;
6969
printf("\nPossible values:\n@table @samp\n");
7070

71-
while ((u = av_next_option(&class, u)))
72-
if (u->type == FF_OPT_TYPE_CONST && u->unit && !strcmp(u->unit, o->unit))
71+
while ((u = av_opt_next(&class, u)))
72+
if (u->type == AV_OPT_TYPE_CONST && u->unit && !strcmp(u->unit, o->unit))
7373
printf("@item %s\n%s\n", u->name, u->help ? u->help : "");
7474
printf("@end table\n");
7575
}
@@ -80,8 +80,8 @@ static void show_opts(const AVClass *class)
8080
const AVOption *o = NULL;
8181

8282
printf("@table @option\n");
83-
while ((o = av_next_option(&class, o)))
84-
if (o->type != FF_OPT_TYPE_CONST)
83+
while ((o = av_opt_next(&class, o)))
84+
if (o->type != AV_OPT_TYPE_CONST)
8585
print_option(class, o);
8686
printf("@end table\n");
8787
}
@@ -114,7 +114,7 @@ static void show_format_opts(void)
114114
static void show_codec_opts(void)
115115
{
116116
void *iter = NULL;
117-
AVCodec *c = NULL;
117+
const AVCodec *c;
118118

119119
printf("@section Generic codec AVOptions\n");
120120
show_opts(avcodec_get_class());

0 commit comments

Comments
 (0)