summaryrefslogtreecommitdiffstats
path: root/filters/f_autoconvert.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-02 17:50:24 +0100
committerwm4 <wm4@nowhere>2019-11-02 17:50:32 +0100
commite58e650a97a3938baeb7d8bb62cdae04ac6b6fb1 (patch)
treece727274a33c6b0a77d1eece716565075e354247 /filters/f_autoconvert.c
parent3e660f6164005d3a532abd76f5e7049c5c4323f9 (diff)
downloadmpv-e58e650a97a3938baeb7d8bb62cdae04ac6b6fb1.tar.bz2
mpv-e58e650a97a3938baeb7d8bb62cdae04ac6b6fb1.tar.xz
video: mess with the filte chain to enable zimg IMGFMT_RGB30 output
This was too hardcoded to libswscale. In particular, IMGFMT_RGB30 output is only possible with the zimg wrapper, so the context needs to be taken into account (since this depends on the --sws-allow-zimg option dynamically). This is still slightly risky, because zimg currently will still fall back to swscale in some cases, such as when it refuses to initialize the particular color conversion that is requested. f_autoconvert.c could actually handle this better, but I'm tool fucking lazy right now, and nobody cares anyway, so go away, OK?
Diffstat (limited to 'filters/f_autoconvert.c')
-rw-r--r--filters/f_autoconvert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/f_autoconvert.c b/filters/f_autoconvert.c
index 20c083de54..d563b1fcd3 100644
--- a/filters/f_autoconvert.c
+++ b/filters/f_autoconvert.c
@@ -309,7 +309,7 @@ static bool build_image_converter(struct mp_autoconvert *c, struct mp_log *log,
goto fail;
}
- int out = mp_sws_find_best_out_format(src_fmt, fmts, num_fmts);
+ int out = mp_sws_find_best_out_format(sws, src_fmt, fmts, num_fmts);
if (!out) {
mp_err(log, "can't find video conversion for %s\n",
mp_imgfmt_to_name(src_fmt));