aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/cmdutils.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-12-17 11:47:33 +0100
committerAnton Khirnov <anton@khirnov.net>2023-12-22 11:39:57 +0100
commit2f1bc3b424f33069e4d870b05898aa1500f9b1ff (patch)
tree9be242e09931ff5d9fb1c9403a9af0ef8bfe14ca /fftools/cmdutils.h
parent66fcfc0009d08ac6ef95f5db4a1b6ee3ba502b8f (diff)
downloadffmpeg-2f1bc3b424f33069e4d870b05898aa1500f9b1ff.tar.gz
fftools/cmdutils: include OPT_PERFILE in OPT_OFFSET
And analogously OPT_OFFSET in OPT_SPEC. Previously the inclusion would be implicit and required all code to remember this.
Diffstat (limited to 'fftools/cmdutils.h')
-rw-r--r--fftools/cmdutils.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index 8e22560fc6..dc99573d80 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -135,17 +135,22 @@ typedef struct OptionDef {
#define OPT_AUDIO (1 << 4)
#define OPT_SUBTITLE (1 << 5)
#define OPT_DATA (1 << 6)
-/* The option is per-file (currently ffmpeg-only). Implied by OPT_OFFSET or
- * OPT_SPEC. At least one of OPT_INPUT or OPT_OUTPUT must be set when this flag
- * is in use.
+/* The option is per-file (currently ffmpeg-only). At least one of OPT_INPUT or
+ * OPT_OUTPUT must be set when this flag is in use.
*/
#define OPT_PERFILE (1 << 7)
-/* Option is specified as an offset in a passed optctx */
-#define OPT_OFFSET (1 << 8)
-/* Option is to be stored in an array of SpecifierOpt. Implies OPT_OFFSET.
+
+/* Option is specified as an offset in a passed optctx.
+ * Always use as OPT_OFFSET in option definitions. */
+#define OPT_FLAG_OFFSET (1 << 8)
+#define OPT_OFFSET (OPT_FLAG_OFFSET | OPT_PERFILE)
+
+/* Option is to be stored in an array of SpecifierOpt.
Next element after the offset is an int containing element count in the
- array. */
-#define OPT_SPEC (1 << 9)
+ array.
+ Always use as OPT_SPEC in option definitions. */
+#define OPT_FLAG_SPEC (1 << 9)
+#define OPT_SPEC (OPT_FLAG_SPEC | OPT_OFFSET)
/* ffmpeg-only - specifies whether an OPT_PERFILE option applies to input,
* output, or both. */
#define OPT_INPUT (1 << 10)