summaryrefslogtreecommitdiffstats
path: root/options/m_option.c
diff options
context:
space:
mode:
Diffstat (limited to 'options/m_option.c')
-rw-r--r--options/m_option.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/options/m_option.c b/options/m_option.c
index 9bf2ebd132..a2f3af4177 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -1924,9 +1924,11 @@ static int parse_imgfmt(struct mp_log *log, const m_option_t *opt,
if (!bstrcmp0(param, "help")) {
mp_info(log, "Available formats:");
- for (int i = 0; mp_imgfmt_list[i].name; i++)
- mp_info(log, " %s", mp_imgfmt_list[i].name);
+ char **list = mp_imgfmt_name_list();
+ for (int i = 0; list[i]; i++)
+ mp_info(log, " %s", list[i]);
mp_info(log, "\n");
+ talloc_free(list);
return M_OPT_EXIT - 1;
}