From ab5b25034331ea7740b12e5314e16b1d5ad7624b Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Mon, 1 Jan 2024 21:17:16 +0100 Subject: [PATCH] command: allow changing --gpu-api and --gpu-context at runtime --- player/command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/player/command.c b/player/command.c index ad61d773e17c0..fc730f43ab07a 100644 --- a/player/command.c +++ b/player/command.c @@ -56,6 +56,7 @@ #include "options/m_property.h" #include "options/m_config_frontend.h" #include "osdep/getpid.h" +#include "video/out/gpu/context.h" #include "video/out/vo.h" #include "video/csputils.h" #include "video/hwdec.h" @@ -7006,7 +7007,9 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags, mpctx->ipc_ctx = mp_init_ipc(mpctx->clients, mpctx->global); } - if (opt_ptr == &opts->vo->video_driver_list) { + if (opt_ptr == &opts->vo->video_driver_list || + opt_ptr == &opts->ra_ctx_opts->context_name || + opt_ptr == &opts->ra_ctx_opts->context_type) { struct track *track = mpctx->current_track[0][STREAM_VIDEO]; uninit_video_out(mpctx); handle_force_window(mpctx, true);