summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-30 12:19:32 +0200
committerwm4 <wm4@nowhere>2017-08-30 12:19:32 +0200
commit9f0e3588279ef343383f6d7a39099a5e92cc6963 (patch)
treefe52f9ab142a932e5f5f5a78a3ab5ee6be396b6c
parent96462040ec79b353457b64949f96fad30bd6e988 (diff)
downloadmpv-9f0e3588279ef343383f6d7a39099a5e92cc6963.tar.bz2
mpv-9f0e3588279ef343383f6d7a39099a5e92cc6963.tar.xz
vo_opengl: fix overlay mode (again)
Did I mention yet that I regret this overlay mode thing?
-rw-r--r--video/out/opengl/video.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 53f6b8a21c..48477fe18d 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -804,19 +804,20 @@ static void init_video(struct gl_video *p)
p->use_integer_conversion = false;
if (p->hwdec && ra_hwdec_test_format(p->hwdec, p->image_params.imgfmt)) {
- p->hwdec_mapper = ra_hwdec_mapper_create(p->hwdec, &p->image_params);
- if (!p->hwdec_mapper)
- MP_ERR(p, "Initializing texture for hardware decoding failed.\n");
+ if (p->hwdec->driver->overlay_frame) {
+ MP_WARN(p, "Using HW-overlay mode. No GL filtering is performed "
+ "on the video!\n");
+ } else {
+ p->hwdec_mapper = ra_hwdec_mapper_create(p->hwdec, &p->image_params);
+ if (!p->hwdec_mapper)
+ MP_ERR(p, "Initializing texture for hardware decoding failed.\n");
+ }
if (p->hwdec_mapper)
p->image_params = p->hwdec_mapper->dst_params;
const char **exts = p->hwdec->glsl_extensions;
for (int n = 0; exts && exts[n]; n++)
gl_sc_enable_extension(p->sc, (char *)exts[n]);
p->hwdec_active = true;
- if (p->hwdec->driver->overlay_frame) {
- MP_WARN(p, "Using HW-overlay mode. No GL filtering is performed "
- "on the video!\n");
- }
}
p->ra_format = (struct ra_imgfmt_desc){0};