summaryrefslogtreecommitdiffstats
path: root/chromium/media/base/channel_mixer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/media/base/channel_mixer.cc')
-rw-r--r--chromium/media/base/channel_mixer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chromium/media/base/channel_mixer.cc b/chromium/media/base/channel_mixer.cc
index 3de63fe8bf1..4c5179b40a8 100644
--- a/chromium/media/base/channel_mixer.cc
+++ b/chromium/media/base/channel_mixer.cc
@@ -23,9 +23,10 @@ static const float kEqualPowerScale = static_cast<float>(M_SQRT1_2);
static void ValidateLayout(ChannelLayout layout) {
CHECK_NE(layout, CHANNEL_LAYOUT_NONE);
- CHECK_NE(layout, CHANNEL_LAYOUT_MAX);
+ CHECK_LE(layout, CHANNEL_LAYOUT_MAX);
CHECK_NE(layout, CHANNEL_LAYOUT_UNSUPPORTED);
CHECK_NE(layout, CHANNEL_LAYOUT_DISCRETE);
+ CHECK_NE(layout, CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC);
// Verify there's at least one channel. Should always be true here by virtue
// of not being one of the invalid layouts, but lets double check to be sure.
@@ -170,7 +171,7 @@ bool MatrixBuilder::CreateTransformationMatrix(
}
// Route matching channels and figure out which ones aren't accounted for.
- for (Channels ch = LEFT; ch < CHANNELS_MAX;
+ for (Channels ch = LEFT; ch < CHANNELS_MAX + 1;
ch = static_cast<Channels>(ch + 1)) {
int input_ch_index = ChannelOrder(input_layout_, ch);
if (input_ch_index < 0)