From c02aa154ab45d3534e2c507f5f7a7e1b1c4e81f2 Mon Sep 17 00:00:00 2001 From: llyyr Date: Tue, 3 Sep 2024 19:27:34 +0530 Subject: [PATCH] vo_gpu: restore dovi mapping directly on image_params after init --- video/out/gpu/libmpv_gpu.c | 4 +--- video/out/gpu/video.c | 1 + video/out/vo_gpu.c | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/video/out/gpu/libmpv_gpu.c b/video/out/gpu/libmpv_gpu.c index 36be7457a3..0878fa00f1 100644 --- a/video/out/gpu/libmpv_gpu.c +++ b/video/out/gpu/libmpv_gpu.c @@ -124,9 +124,7 @@ static void reconfig(struct render_backend *ctx, struct mp_image_params *params) { struct priv *p = ctx->priv; - struct mp_image_params fallback_params = *params; - mp_image_params_restore_dovi_mapping(&fallback_params); - gl_video_config(p->renderer, &fallback_params); + gl_video_config(p->renderer, params); } static void reset(struct render_backend *ctx) diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 54961ffa1b..5bd30fe286 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -911,6 +911,7 @@ static void init_video(struct gl_video *p) } p->color_swizzle[4] = '\0'; + mp_image_params_restore_dovi_mapping(&p->image_params); mp_image_params_guess_csp(&p->image_params); av_lfg_init(&p->lfg, 1); diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c index e5c228d5ed..d49a6ba8a2 100644 --- a/video/out/vo_gpu.c +++ b/video/out/vo_gpu.c @@ -123,9 +123,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params) return -1; resize(vo); - struct mp_image_params fallback_params = *params; - mp_image_params_restore_dovi_mapping(&fallback_params); - gl_video_config(p->renderer, &fallback_params); + gl_video_config(p->renderer, params); return 0; }