summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2023-11-07 21:34:06 +0100
committerDudemanguy <random342@airmail.cc>2023-11-07 20:49:44 +0000
commit5c2cdb749d77bbb3f5fb0aceb45f987e50cd3d0e (patch)
tree5480e6ec216eab42c40ef630b2adcd561e1da39b /player/lua
parent00533ccdae7e77c5e38b1ed748b1a15b8e6dfd5e (diff)
downloadmpv-5c2cdb749d77bbb3f5fb0aceb45f987e50cd3d0e.tar.bz2
mpv-5c2cdb749d77bbb3f5fb0aceb45f987e50cd3d0e.tar.xz
console.lua: don't print the console log to the OSD when switching VO
Fixes #12735, fixes #12839.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/console.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/player/lua/console.lua b/player/lua/console.lua
index d8fa00f005..a985a43498 100644
--- a/player/lua/console.lua
+++ b/player/lua/console.lua
@@ -256,7 +256,14 @@ end
function update()
pending_update = false
- if not mp.get_property_native('vo-configured') then
+ -- Print to the terminal when there is no VO. Check both vo-configured so
+ -- it works with --force-window --idle and no video tracks, and whether
+ -- there is a video track so that the condition doesn't become true while
+ -- switching VO at runtime, making mp.osd_message() print to the VO's OSD.
+ -- This issue does not happen when switching VO without any video track
+ -- regardless of the condition used.
+ if not mp.get_property_native('vo-configured')
+ and not mp.get_property('current-tracks/video') then
print_to_terminal()
return
end