1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 17:42:17 +00:00

options: allow hwaccel formats in -vf format/noformat

There are 3 users of the image format option type: demux_raw,
vf_format, vf_noformat. Allow the hwaccel formats (like vdpau etc.)
in general, so that the filters can use it. This won't work for
demux_raw, so explicitly reject these formats there.
This commit is contained in:
wm4 2013-12-07 19:39:45 +01:00
parent d658b115a0
commit 62925a5c15
2 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ static int demux_rawvideo_open(demuxer_t *demuxer, enum demux_check check)
const char *decoder = "rawvideo";
int imgfmt = vformat;
if (mp_format) {
if (mp_format && !IMGFMT_IS_HWACCEL(mp_format)) {
decoder = "mp-rawvideo";
imgfmt = mp_format;
if (!imgsize) {

View File

@ -1563,7 +1563,7 @@ static int parse_imgfmt(const m_option_t *opt, struct bstr name,
return M_OPT_EXIT - 1;
}
unsigned int fmt = mp_imgfmt_from_name(param, false);
unsigned int fmt = mp_imgfmt_from_name(param, true);
if (!fmt) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
"Option %.*s: unknown format name: '%.*s'\n",