diff options
author | wm4 <wm4@nowhere> | 2014-04-14 20:19:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-14 20:51:27 +0200 |
commit | 186fd0311db32a24879669620fd6a2d8e32d2931 (patch) | |
tree | 87e4b2c22619799a231bce07312ce32f14f94658 /options | |
parent | a7c6c4656de1938729d27fb6f02b7e46a71c35fb (diff) | |
download | mpv-186fd0311db32a24879669620fd6a2d8e32d2931.tar.bz2 mpv-186fd0311db32a24879669620fd6a2d8e32d2931.tar.xz |
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".
Diffstat (limited to 'options')
-rw-r--r-- | options/m_option.c | 6 |
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; } |