From 186fd0311db32a24879669620fd6a2d8e32d2931 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 14 Apr 2014 20:19:44 +0200 Subject: video: change image format names, prefer mostly FFmpeg names The most user visible change is that "420p" is now displayed as "yuv420p". This is what FFmpeg uses (almost), and is also less confusing since "420p" is often confused with "420 pixels vertical resolution". In general, we return the FFmpeg pixel format name. We still use our own old mechanism to keep a list of exceptions to provide compatibility for a while. Also, never return NULL for image format names. If the format is unset (0/IMGFMT_NONE), return "none". If the format has no name (probably never happens, FFmpeg seems to guarantee that a name is set), return "unknown". --- options/m_option.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'options/m_option.c') 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; } -- cgit v1.2.3