diff options
author | sfan5 <sfan5@live.de> | 2020-11-19 15:12:04 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-11-27 17:28:59 +0100 |
commit | 6ebac1f794623e2b62d599f944fb91d42a7b1c3d (patch) | |
tree | 019e50c4c068398a8f86aea64f537c3fe02df0e1 /player/command.c | |
parent | 10fbd305c87b04b14f811d1eab820a3f3fdc1a3f (diff) | |
download | mpv-6ebac1f794623e2b62d599f944fb91d42a7b1c3d.tar.bz2 mpv-6ebac1f794623e2b62d599f944fb91d42a7b1c3d.tar.xz |
player: allow vo to be switched at runtime
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 066e8be784..098a11d24f 100644 --- a/player/command.c +++ b/player/command.c @@ -6525,6 +6525,16 @@ 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) { + struct track *track = mpctx->current_track[0][STREAM_VIDEO]; + uninit_video_out(mpctx); + reinit_video_chain(mpctx); + if (track) + reselect_demux_stream(mpctx, track, true); + + mp_wakeup_core(mpctx); + } + if (flags & UPDATE_AUDIO) reload_audio_output(mpctx); |