瀏覽代碼

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 年之前
父節點
當前提交
5c560f2c82
共有 1 個文件被更改,包括 1 次插入1 次删除
  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");