vo_gpu: restore dovi mapping directly on image_params after init

This commit is contained in:
llyyr 2024-09-03 19:27:34 +05:30 committed by Kacper Michajłow
parent 3acd253e89
commit c02aa154ab
3 changed files with 3 additions and 6 deletions

View File

@ -124,9 +124,7 @@ static void reconfig(struct render_backend *ctx, struct mp_image_params *params)
{ {
struct priv *p = ctx->priv; struct priv *p = ctx->priv;
struct mp_image_params fallback_params = *params; gl_video_config(p->renderer, params);
mp_image_params_restore_dovi_mapping(&fallback_params);
gl_video_config(p->renderer, &fallback_params);
} }
static void reset(struct render_backend *ctx) static void reset(struct render_backend *ctx)

View File

@ -911,6 +911,7 @@ static void init_video(struct gl_video *p)
} }
p->color_swizzle[4] = '\0'; p->color_swizzle[4] = '\0';
mp_image_params_restore_dovi_mapping(&p->image_params);
mp_image_params_guess_csp(&p->image_params); mp_image_params_guess_csp(&p->image_params);
av_lfg_init(&p->lfg, 1); av_lfg_init(&p->lfg, 1);

View File

@ -123,9 +123,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
return -1; return -1;
resize(vo); resize(vo);
struct mp_image_params fallback_params = *params; gl_video_config(p->renderer, params);
mp_image_params_restore_dovi_mapping(&fallback_params);
gl_video_config(p->renderer, &fallback_params);
return 0; return 0;
} }