Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: media/base/audio_converter.cc

Issue 1070923002: Fix incorrect AudioConverter setup for discrete channel layouts. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/audio_converter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_converter.cc
diff --git a/media/base/audio_converter.cc b/media/base/audio_converter.cc
index 194111914e0d05ec14f1fb8c5e5833d150554cb1..be68ac627fa0d791584580fb628bcb397b42e56e 100644
--- a/media/base/audio_converter.cc
+++ b/media/base/audio_converter.cc
@@ -33,7 +33,8 @@ AudioConverter::AudioConverter(const AudioParameters& input_params,
CHECK(output_params.IsValid());
// Handle different input and output channel layouts.
- if (input_params.channel_layout() != output_params.channel_layout()) {
+ if (input_params.channel_layout() != output_params.channel_layout() ||
+ input_params.channels() != output_params.channels()) {
DVLOG(1) << "Remixing channel layout from " << input_params.channel_layout()
<< " to " << output_params.channel_layout() << "; from "
<< input_params.channels() << " channels to "
« no previous file with comments | « no previous file | media/base/audio_converter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698