Permalink
Browse files

Fixed regression mixing down DTS

  • Loading branch information...
1 parent 61e69f0 commit eb634e9b8b49a1e11594869f32d4ee4b3a6e1406 @elan elan committed Sep 11, 2008
Showing with 10 additions and 0 deletions.
  1. +10 −0 xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
@@ -25,6 +25,8 @@
#include "XMemUtils.h"
#endif
#include "../../DVDStreamInfo.h"
+#include "AudioContext.h"
+#include "XBAudioConfig.h"
CDVDAudioCodecFFmpeg::CDVDAudioCodecFFmpeg() : CDVDAudioCodec()
{
@@ -67,6 +69,14 @@ bool CDVDAudioCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
if (pCodec->capabilities & CODEC_CAP_TRUNCATED)
m_pCodecContext->flags |= CODEC_FLAG_TRUNCATED;
+ // See if we're doing mixdown. This is a special case, though, because if we
+ // can play AC3 we're going to transcode.
+ //
+ if (g_audioConfig.HasDigitalOutput() == true && g_audioConfig.GetAC3Enabled() == true)
+ ; // Transcode
+ else if (g_audioContext.IsPassthroughActive() == false)
+ m_pCodecContext->request_channels = 2;
+
m_pCodecContext->channels = hints.channels;
m_pCodecContext->sample_rate = hints.samplerate;
m_pCodecContext->block_align = hints.blockalign;

0 comments on commit eb634e9

Please sign in to comment.