diff options
author | Christoph Heinrich <christoph.heinrich@student.tugraz.at> | 2023-02-20 04:32:50 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-02-21 17:15:17 +0000 |
commit | 91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29 (patch) | |
tree | 448b141d92c9ea7636954213b587aaf380fc21db /common | |
parent | b9850a6e8c45f95563a703af7f21dfe1c1ee40b6 (diff) | |
download | mpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.bz2 mpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.xz |
options: transition options from OPT_FLAG to OPT_BOOL
c78482045444c488bb7948305d583a55d17cd236 introduced a bool option type
as a replacement for the flag type, but didn't actually transition and
remove the flag type because it would have been too much mundane work.
Diffstat (limited to 'common')
-rw-r--r-- | common/encode.h | 8 | ||||
-rw-r--r-- | common/encode_lavc.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/common/encode.h b/common/encode.h index c951e95d51..85fc3f1960 100644 --- a/common/encode.h +++ b/common/encode.h @@ -40,10 +40,10 @@ struct encode_opts { char **aopts; float voffset; float aoffset; - int rawts; - int video_first; - int audio_first; - int copy_metadata; + bool rawts; + bool video_first; + bool audio_first; + bool copy_metadata; char **set_metadata; char **remove_metadata; }; diff --git a/common/encode_lavc.c b/common/encode_lavc.c index 87fe88e33f..7a9a20a517 100644 --- a/common/encode_lavc.c +++ b/common/encode_lavc.c @@ -87,12 +87,12 @@ const struct m_sub_options encode_config = { .deprecation_message = "--audio-delay (once unbroken)"}, {"oaoffset", OPT_FLOAT(aoffset), M_RANGE(-1000000.0, 1000000.0), .deprecation_message = "--audio-delay (once unbroken)"}, - {"orawts", OPT_FLAG(rawts)}, - {"ovfirst", OPT_FLAG(video_first), + {"orawts", OPT_BOOL(rawts)}, + {"ovfirst", OPT_BOOL(video_first), .deprecation_message = "no replacement"}, - {"oafirst", OPT_FLAG(audio_first), + {"oafirst", OPT_BOOL(audio_first), .deprecation_message = "no replacement"}, - {"ocopy-metadata", OPT_FLAG(copy_metadata)}, + {"ocopy-metadata", OPT_BOOL(copy_metadata)}, {"oset-metadata", OPT_KEYVALUELIST(set_metadata)}, {"oremove-metadata", OPT_STRINGLIST(remove_metadata)}, @@ -106,7 +106,7 @@ const struct m_sub_options encode_config = { }, .size = sizeof(struct encode_opts), .defaults = &(const struct encode_opts){ - .copy_metadata = 1, + .copy_metadata = true, }, }; |