瀏覽代碼

Add compatibility hack for newer mpv builds

libmpv did not rebase mkv stream timestamps so that the stream starts at
timestamp 0 (unlike for .ts files and such). This was fixed, but
unfortunately web-client now relies on this mpv bug. Add this hack so
that it can be fixed later, instead of breaking transcode seeking.
Vincent Lang 9 年之前
父節點
當前提交
4129e05f11
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/player/PlayerComponent.cpp

+ 5 - 0
src/player/PlayerComponent.cpp

@@ -70,6 +70,11 @@ bool PlayerComponent::componentInitialize()
   // We don't need this, so avoid initializing fontconfig.
   mpv_set_option_string(m_mpv, "use-text-osd", "no");
 
+  // 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
+  // than 0, and web-client expects that we return these times unchanged.
+  mpv::qt::set_option_variant(m_mpv, "demuxer-mkv-probe-start-time", false);
+
   // Always use the system mixer.
   mpv_set_option_string(m_mpv, "softvol", "no");