Sfoglia il codice sorgente

Enable AC3 encoding only if "optical" device type is selected

We really don't want to trigger AC3 encoding just because the user
selected stereo channels and AC3 passthrough. In general, we want to
avoid AC3 encoding except if the user explicitly enables it, which is by
using the "optical" device type.
Vincent Lang 8 anni fa
parent
commit
5c560f2c82
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/player/PlayerComponent.cpp

+ 1 - 1
src/player/PlayerComponent.cpp

@@ -942,7 +942,7 @@ void PlayerComponent::setAudioConfiguration()
   // if we see user requests for it.
   //
   m_doAc3Transcoding = false;
-  if (layout == "2.0" &&
+  if (deviceType == AUDIO_DEVICE_TYPE_SPDIF &&
       SettingsComponent::Get().value(SETTINGS_SECTION_AUDIO, "passthrough.ac3").toBool())
   {
     mpv::qt::command(m_mpv, QStringList() << "af" << "add" << "@ac3:lavcac3enc");