summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-11-19 15:12:04 +0100
committersfan5 <sfan5@live.de>2020-11-27 17:28:59 +0100
commit6ebac1f794623e2b62d599f944fb91d42a7b1c3d (patch)
tree019e50c4c068398a8f86aea64f537c3fe02df0e1 /player/command.c
parent10fbd305c87b04b14f811d1eab820a3f3fdc1a3f (diff)
downloadmpv-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.c10
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);