summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-03 22:52:12 +0100
committerwm4 <wm4@nowhere>2019-11-03 22:52:12 +0100
commitcfd659538688916ac79df072a56d65d327c69470 (patch)
tree9705d89ee2a8a81ca55885b3eb4599157c3509e1
parenta19571679f2b7f6c5e1faf9a08c6c1a16c62389c (diff)
downloadmpv-cfd659538688916ac79df072a56d65d327c69470.tar.bz2
mpv-cfd659538688916ac79df072a56d65d327c69470.tar.xz
vo_x11: accept zimg formats
This is slightly helpful for testing, and otherwise useless and without consequence. I'm not using the correct output format and using IMGFMT_RGB0 as placeholder. This doesn't matter currently, as both sws and zimg support this as output (and support any input for it). I'm doing this because it's surprisingly tricky to get the correct output format at this point, without digging deeper into x11 shit or refactoring parts of the VO. I don't care enough about this.
-rw-r--r--video/out/vo_x11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index ee20f12c38..f8a85d3e13 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -350,7 +350,8 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
static int query_format(struct vo *vo, int format)
{
- if (sws_isSupportedInput(imgfmt2pixfmt(format)))
+ struct priv *p = vo->priv;
+ if (mp_sws_supports_formats(p->sws, IMGFMT_RGB0, format))
return 1;
return 0;
}