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 14:34:10 (GMT)
commitc29d36f1634cd837276b4fd8cfea5d5d75304da8 (patch)
tree70dfc7bb0fd537ee6489a0a9daf8eb6b1788417c
parent9743d9c6af8a6a519c7a4d98fb434e3fa45ebe76 (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) [cherry-picked from c5b6e923]
-rw-r--r--mythtv/libs/libmyth/audiooutputbase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/mythtv/libs/libmyth/audiooutputbase.cpp b/mythtv/libs/libmyth/audiooutputbase.cpp
index 48e1801..54e9371 100644
--- a/mythtv/libs/libmyth/audiooutputbase.cpp
+++ b/mythtv/libs/libmyth/audiooutputbase.cpp
@@ -421,6 +421,13 @@ void AudioOutputBase::Reconfigure(const AudioSettings &orig_settings)
.arg(output_settings->FormatToString(format))
.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;
+ }
+
/* Encode to AC-3 if we're allowed to passthru but aren't currently
and we have more than 2 channels but multichannel PCM is not supported
or if the device just doesn't support the number of channels */