Parcourir la source

Disable mpv internal OSD when processing user commands

The mpv OSD is normally unused, but for some reason mpv_command_string()
has special semantics, and will let commands display OSD messages. Not
really appropriate when running inside an application like PMP. Disable
the internal OSD completely. (This does not affect subtitles.)

Also, the "use-text-osd" option is gone - it achieved the same effect,
but was actually just a hack to soften the impact of fontconfig
misbehavior.
Vincent Lang il y a 9 ans
Parent
commit
8be6d9bc9c
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/player/PlayerComponent.cpp

+ 2 - 2
src/player/PlayerComponent.cpp

@@ -74,8 +74,8 @@ bool PlayerComponent::componentInitialize()
   mpv_set_option_string(m_mpv, "config", "yes");
   mpv_set_option_string(m_mpv, "config-dir", Paths::dataDir().toUtf8().data());
 
-  // We don't need this, so avoid initializing fontconfig.
-  mpv_set_option_string(m_mpv, "use-text-osd", "no");
+  // Disable native OSD if mpv_command_string() is used.
+  mpv_set_option_string(m_mpv, "osd-level", "0");
 
   // This forces the player not to rebase playback time to 0 with mkv. We
   // require this, because mkv transcoding lets files start at times other