diff options
author | Guido Cella <guido@guidocella.xyz> | 2024-01-01 21:17:16 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-01-01 22:41:49 +0100 |
commit | ab5b25034331ea7740b12e5314e16b1d5ad7624b (patch) | |
tree | 4f35cfa77859e7d4a0de41f8a5ef558eec7fb73a | |
parent | 7521b65d929e00ce82a9b24f7989b5d42835d8fe (diff) | |
download | mpv-ab5b25034331ea7740b12e5314e16b1d5ad7624b.tar.bz2 mpv-ab5b25034331ea7740b12e5314e16b1d5ad7624b.tar.xz |
command: allow changing --gpu-api and --gpu-context at runtime
-rw-r--r-- | player/command.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index ad61d773e1..fc730f43ab 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); |