summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2012-02-21 13:53:34 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2012-02-21 13:53:34 (GMT)
commitc5b6e923e3fd0a95190c290544bc820f8a86a0cc (patch)
tree5fea54c3b7bdba8f98dc1f8beea389e415ba1386
parentefcfee33fc77d1e9acbaf54c2fe44b5fc28bf0a5 (diff)
Do not attempt to play audio with more than 8 channels if not supported natively.
While trying to play an encrypted video over airplay, all nasty things would happen. So add a safeguard so we never try to play more than 8 channels audio unless the hardware supports it (e.g. not requiring downmixing)
-rw-r--r--mythtv/libs/libmyth/audio/audiooutputbase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/mythtv/libs/libmyth/audio/audiooutputbase.cpp b/mythtv/libs/libmyth/audio/audiooutputbase.cpp
index 9d6e3de..eed99c0 100644
--- a/mythtv/libs/libmyth/audio/audiooutputbase.cpp
+++ b/mythtv/libs/libmyth/audio/audiooutputbase.cpp
@@ -622,6 +622,13 @@ void AudioOutputBase::Reconfigure(const AudioSettings &orig_settings)
.arg(samplerate/1000)
.arg(source_channels));
+ if (needs_downmix && source_channels > 8)
+ {
+ Error("Aborting Audio Reconfigure. "
+ "Can't handle audio with more than 8 channels.");
+ return;
+ }
+
VBAUDIO(QString("enc(%1), passthru(%2), features (%3) "
"configured_channels(%4), %5 channels supported(%6) "
"max_channels(%7)")