From 993bee38ca5e4d5d7e95b18b168cbfb9a616dba9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Sep 2015 12:07:20 +0200 Subject: vo_opengl: vaapi: handle YV12 correctly This specific FourCC has its planes swapped compared to FFmpeg yuv420p. --- video/out/opengl/hwdec_vaegl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video') diff --git a/video/out/opengl/hwdec_vaegl.c b/video/out/opengl/hwdec_vaegl.c index 1e470668f9..52738cbb4d 100644 --- a/video/out/opengl/hwdec_vaegl.c +++ b/video/out/opengl/hwdec_vaegl.c @@ -228,6 +228,9 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image, } gl->BindTexture(GL_TEXTURE_2D, 0); + if (va_image->format.fourcc == VA_FOURCC_YV12) + MPSWAP(GLuint, out_textures[1], out_textures[2]); + va_unlock(p->ctx); return 0; -- cgit v1.2.3