mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
all: use designated initializers for AVOption.unit
Makes it robust against adding fields before it, which will be useful in
following commits.
Majority of the patch generated by the following Coccinelle script:
@@
typedef AVOption;
identifier arr_name;
initializer list il;
initializer list[8] il1;
expression tail;
@@
AVOption arr_name[] = { il, { il1,
- tail
+ .unit = tail
}, ... };
with some manual changes, as the script:
* has trouble with options defined inside macros
* sometimes does not handle options under an #else branch
* sometimes swallows whitespace
This commit is contained in:
@@ -47,10 +47,10 @@
|
||||
#define A AV_OPT_FLAG_AUDIO_PARAM
|
||||
static const AVOption filtergraph_options[] = {
|
||||
{ "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,
|
||||
{ .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, F|V|A, "thread_type" },
|
||||
{ .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, F|V|A, .unit = "thread_type" },
|
||||
{ "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .flags = F|V|A, .unit = "thread_type" },
|
||||
{ "threads", "Maximum number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT,
|
||||
{ .i64 = 0 }, 0, INT_MAX, F|V|A, "threads"},
|
||||
{ .i64 = 0 }, 0, INT_MAX, F|V|A, .unit = "threads"},
|
||||
{"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, .flags = F|V|A, .unit = "threads"},
|
||||
{"scale_sws_opts" , "default scale filter options" , OFFSET(scale_sws_opts) ,
|
||||
AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, F|V },
|
||||
|
||||
Reference in New Issue
Block a user