Skip to content

Commit

Permalink
command: allow changing --gpu-api and --gpu-context at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
guidocella authored and sfan5 committed Jan 1, 2024
1 parent 7521b65 commit ab5b250
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion player/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ab5b250

Please sign in to comment.