summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--options/m_option.c7
-rw-r--r--video/decode/vd_lavc.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/options/m_option.c b/options/m_option.c
index fcc52406ff..aa1ac71ae6 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -2356,8 +2356,6 @@ const m_option_type_t m_option_type_size_box = {
static int parse_imgfmt(struct mp_log *log, const m_option_t *opt,
struct bstr name, struct bstr param, void *dst)
{
- bool accept_no = opt->min < 0;
-
if (param.len == 0)
return M_OPT_MISSING_PARAM;
@@ -2366,15 +2364,14 @@ static int parse_imgfmt(struct mp_log *log, const m_option_t *opt,
char **list = mp_imgfmt_name_list();
for (int i = 0; list[i]; i++)
mp_info(log, " %s", list[i]);
- if (accept_no)
- mp_info(log, " no");
+ mp_info(log, " no");
mp_info(log, "\n");
talloc_free(list);
return M_OPT_EXIT;
}
unsigned int fmt = mp_imgfmt_from_name(param);
- if (!fmt && !(accept_no && bstr_equals0(param, "no"))) {
+ if (!fmt && !bstr_equals0(param, "no")) {
mp_err(log, "Option %.*s: unknown format name: '%.*s'\n",
BSTR_P(name), BSTR_P(param));
return M_OPT_INVALID;
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 9a647bf50c..e0732397a8 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -120,7 +120,7 @@ const struct m_sub_options vd_lavc_conf = {
{"hwdec", OPT_STRING_VALIDATE(hwdec_api, hwdec_validate_opt),
.flags = M_OPT_OPTIONAL_PARAM | UPDATE_HWDEC},
{"hwdec-codecs", OPT_STRING(hwdec_codecs)},
- {"hwdec-image-format", OPT_IMAGEFORMAT(hwdec_image_format), .min = -1},
+ {"hwdec-image-format", OPT_IMAGEFORMAT(hwdec_image_format)},
{"hwdec-extra-frames", OPT_INT(hwdec_extra_frames), M_RANGE(0, 256)},
{0}
},