summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-24 23:48:57 +0200
committerwm4 <wm4@nowhere>2015-09-24 23:48:57 +0200
commit57831d52dc0c8d22feb497d06ac934192b5b907b (patch)
tree6cd48f5851ec2837cbf8120ede3f258c02c261c5 /video/out/opengl/video.c
parentb14c9eb748d80cff3e362c2093a8fb26bce337cf (diff)
downloadmpv-57831d52dc0c8d22feb497d06ac934192b5b907b.tar.bz2
mpv-57831d52dc0c8d22feb497d06ac934192b5b907b.tar.xz
vo_opengl: actually set hardware decoder mapped texture format
Surfaces used by hardware decoding formats can be mapped exactly like a specific software pixel format, e.g. RGBA or NV12. p->image_params is supposed to be set to this format, but it wasn't. (How did this ever work?) Also, setting params->imgfmt in the hwdec interop drivers is pointless and redundant. (Change them to asserts, because why not.)
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 291e98d0a8..10db8f88b6 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -691,6 +691,7 @@ static void init_video(struct gl_video *p)
if (p->hwdec->driver->reinit(p->hwdec, &p->image_params) < 0)
MP_ERR(p, "Initializing texture for hardware decoding failed.\n");
init_format(p->image_params.imgfmt, p);
+ p->image_params.imgfmt = p->image_desc.id;
p->gl_target = p->hwdec->gl_texture_target;
}