فهرست منبع

PlayerComponent: always select an audio stream

We don't have a concept of playing something without audio, so if we
can't find a stream always select the first one. This avoids accidental
failure if the web-client stream ID somehow mismatches, or isn't
provided.
Vincent Lang 8 سال پیش
والد
کامیت
b45bbf246b
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/player/PlayerComponent.cpp

+ 1 - 1
src/player/PlayerComponent.cpp

@@ -775,7 +775,7 @@ void PlayerComponent::reselectStream(const QString &streamSelection, MediaType t
 
   // Fallback to the first stream if none could be found.
   // Useful if web-client uses wrong stream IDs when e.g. transcoding.
-  if (!streamID.isEmpty() && selection.isEmpty())
+  if ((target == MediaType::Audio || !streamID.isEmpty()) && selection.isEmpty())
     selection = "1";
 
   mpv::qt::set_property(m_mpv, streamIdPropertyName, selection);