summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_format.c
diff options
context:
space:
mode:
authorChristoph Heinrich <christoph.heinrich@student.tugraz.at>2023-02-20 04:32:50 +0100
committerDudemanguy <random342@airmail.cc>2023-02-21 17:15:17 +0000
commit91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29 (patch)
tree448b141d92c9ea7636954213b587aaf380fc21db /video/filter/vf_format.c
parentb9850a6e8c45f95563a703af7f21dfe1c1ee40b6 (diff)
downloadmpv-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 'video/filter/vf_format.c')
-rw-r--r--video/filter/vf_format.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c
index 6c3061ce0a..0073efab7f 100644
--- a/video/filter/vf_format.c
+++ b/video/filter/vf_format.c
@@ -55,10 +55,10 @@ struct vf_format_opts {
int w, h;
int dw, dh;
double dar;
- int convert;
+ bool convert;
int force_scaler;
- int dovi;
- int film_grain;
+ bool dovi;
+ bool film_grain;
};
static void set_params(struct vf_format_opts *p, struct mp_image_params *out,
@@ -219,9 +219,9 @@ static const m_option_t vf_opts_fields[] = {
{"dw", OPT_INT(dw)},
{"dh", OPT_INT(dh)},
{"dar", OPT_DOUBLE(dar)},
- {"convert", OPT_FLAG(convert)},
- {"dolbyvision", OPT_FLAG(dovi)},
- {"film-grain", OPT_FLAG(film_grain)},
+ {"convert", OPT_BOOL(convert)},
+ {"dolbyvision", OPT_BOOL(dovi)},
+ {"film-grain", OPT_BOOL(film_grain)},
{"force-scaler", OPT_CHOICE(force_scaler,
{"auto", MP_SWS_AUTO},
{"sws", MP_SWS_SWS},
@@ -238,8 +238,8 @@ const struct mp_user_filter_entry vf_format = {
.priv_size = sizeof(OPT_BASE_STRUCT),
.priv_defaults = &(const OPT_BASE_STRUCT){
.rotate = -1,
- .dovi = 1,
- .film_grain = 1,
+ .dovi = true,
+ .film_grain = true,
},
.options = vf_opts_fields,
},