summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/opengl/hwdec_dxva2egl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_dxva2egl.c b/video/out/opengl/hwdec_dxva2egl.c
index 65cb90eba3..c52d7a2166 100644
--- a/video/out/opengl/hwdec_dxva2egl.c
+++ b/video/out/opengl/hwdec_dxva2egl.c
@@ -91,6 +91,8 @@ static void destroy(struct gl_hwdec *hw)
IDirect3D9Ex_Release(p->d3d9ex);
}
+static int reinit(struct gl_hwdec *hw, struct mp_image_params *params);
+
static int create(struct gl_hwdec *hw)
{
if (!angle_load())
@@ -207,6 +209,16 @@ static int create(struct gl_hwdec *hw)
goto fail;
}
+
+ struct mp_image_params dummy_params = {
+ .imgfmt = IMGFMT_DXVA2,
+ .w = 256,
+ .h = 256,
+ };
+ if (reinit(hw, &dummy_params) < 0)
+ goto fail;
+ destroy_textures(hw);
+
p->hwctx = (struct mp_hwdec_ctx){
.type = HWDEC_DXVA2,
.driver_name = hw->driver->name,