summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2024-01-01 21:17:16 +0100
committersfan5 <sfan5@live.de>2024-01-01 22:41:49 +0100
commitab5b25034331ea7740b12e5314e16b1d5ad7624b (patch)
tree4f35cfa77859e7d4a0de41f8a5ef558eec7fb73a /player/command.c
parent7521b65d929e00ce82a9b24f7989b5d42835d8fe (diff)
downloadmpv-ab5b25034331ea7740b12e5314e16b1d5ad7624b.tar.bz2
mpv-ab5b25034331ea7740b12e5314e16b1d5ad7624b.tar.xz
command: allow changing --gpu-api and --gpu-context at runtime
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c5
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);