فهرست منبع

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");