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 /libavcodec/bsf/av1_metadata.c | |
parent | 8a2c8687bdb03fd2da9734c1340046f157458ca4 (diff) | |
download | ffmpeg-1e7d2007c3aca1cc1cd3b1ca409f4ded6c885f86.tar.gz |
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 'libavcodec/bsf/av1_metadata.c')
-rw-r--r-- | libavcodec/bsf/av1_metadata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/bsf/av1_metadata.c b/libavcodec/bsf/av1_metadata.c index 41b02cc836..cb51d2eee6 100644 --- a/libavcodec/bsf/av1_metadata.c +++ b/libavcodec/bsf/av1_metadata.c @@ -179,7 +179,7 @@ static const AVOption av1_metadata_options[] = { { "color_range", "Set color range flag (section 6.4.2)", OFFSET(color_range), AV_OPT_TYPE_INT, - { .i64 = -1 }, -1, 1, FLAGS, "cr" }, + { .i64 = -1 }, -1, 1, FLAGS, .unit = "cr" }, { "tv", "TV (limited) range", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, .flags = FLAGS, .unit = "cr" }, { "pc", "PC (full) range", 0, AV_OPT_TYPE_CONST, @@ -187,7 +187,7 @@ static const AVOption av1_metadata_options[] = { { "chroma_sample_position", "Set chroma sample position (section 6.4.2)", OFFSET(chroma_sample_position), AV_OPT_TYPE_INT, - { .i64 = -1 }, -1, 3, FLAGS, "csp" }, + { .i64 = -1 }, -1, 3, FLAGS, .unit = "csp" }, { "unknown", "Unknown chroma sample position", 0, AV_OPT_TYPE_CONST, { .i64 = AV1_CSP_UNKNOWN }, .flags = FLAGS, .unit = "csp" }, { "vertical", "Left chroma sample position", 0, AV_OPT_TYPE_CONST, |