vo_opengl: fix overlay mode (again)

Did I mention yet that I regret this overlay mode thing?
This commit is contained in:
wm4 2017-08-30 12:19:32 +02:00
parent 96462040ec
commit 9f0e358827
1 changed files with 8 additions and 7 deletions

View File

@ -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};