diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-02-11 15:41:05 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-02-14 14:53:41 +0100 |
commit | 1e7d2007c3aca1cc1cd3b1ca409f4ded6c885f86 (patch) | |
tree | a8348cf24bf8e9209fc60e04ef2eaaf4c0351830 /libavfilter/avf_abitscope.c | |
parent | 8a2c8687bdb03fd2da9734c1340046f157458ca4 (diff) |
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
Diffstat (limited to 'libavfilter/avf_abitscope.c')
-rw-r--r-- | libavfilter/avf_abitscope.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/avf_abitscope.c b/libavfilter/avf_abitscope.c index c74970981e..60dba21be1 100644 --- a/libavfilter/avf_abitscope.c +++ b/libavfilter/avf_abitscope.c @@ -56,10 +56,10 @@ static const AVOption abitscope_options[] = { { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="1024x256"}, 0, 0, FLAGS }, { "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="1024x256"}, 0, 0, FLAGS }, { "colors", "set channels colors", OFFSET(colors), AV_OPT_TYPE_STRING, {.str = "red|green|blue|yellow|orange|lime|pink|magenta|brown" }, 0, 0, FLAGS }, - { "mode", "set output mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FLAGS, "mode" }, - { "m", "set output mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FLAGS, "mode" }, - { "bars", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, 0, 0, FLAGS, "mode" }, - { "trace", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, 0, 0, FLAGS, "mode" }, + { "mode", "set output mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FLAGS, .unit = "mode" }, + { "m", "set output mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FLAGS, .unit = "mode" }, + { "bars", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, 0, 0, FLAGS, .unit = "mode" }, + { "trace", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, 0, 0, FLAGS, .unit = "mode" }, { NULL } }; |