소스 검색

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