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