Przeglądaj źródła

PlayerComponent: do not convert seek target to string

Paints over the problem in #244, but other things will fail.

Also get rid of adding the start time - this doesn't matter in newer mpv
releases.
Vincent Lang 9 lat temu
rodzic
commit
425ca64f39
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      src/player/PlayerComponent.cpp

+ 2 - 3
src/player/PlayerComponent.cpp

@@ -524,9 +524,8 @@ void PlayerComponent::pause()
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 void PlayerComponent::seekTo(qint64 ms)
 {
-  double start = mpv::qt::get_property_variant(m_mpv, "time-start").toDouble();
-  QString timeStr = QString::number(ms / 1000.0 + start);
-  QStringList args = (QStringList() << "seek" << timeStr << "absolute+exact");
+  double timeSecs = ms / 1000.0;
+  QVariantList args = (QVariantList() << "seek" << timeSecs << "absolute+exact");
   mpv::qt::command_variant(m_mpv, args);
 }