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

Unified Diff: content/common/media/media_param_traits.cc

Issue 1304973005: Refactor AudioParameters member setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dalecurtis comments. Created 5 years, 3 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
Index: content/common/media/media_param_traits.cc
diff --git a/content/common/media/media_param_traits.cc b/content/common/media/media_param_traits.cc
index 19c3b87975badff70e7cce7c8eeb4aa5b63b443a..7b3edcd8528cc2e8c0898316788a0ac253c7c7ee 100644
--- a/content/common/media/media_param_traits.cc
+++ b/content/common/media/media_param_traits.cc
@@ -44,8 +44,11 @@ bool ParamTraits<AudioParameters>::Read(const Message* m,
return false;
}
- AudioParameters params(format, channel_layout, channels, sample_rate,
- bits_per_sample, frames_per_buffer, effects);
+ AudioParameters params(format, channel_layout, sample_rate, bits_per_sample,
+ frames_per_buffer);
+ params.set_channels_for_discrete(channels);
+ params.set_effects(effects);
+
*r = params;
return r->IsValid();
}
@@ -81,4 +84,4 @@ void ParamTraits<VideoCaptureFormat>::Log(const VideoCaptureFormat& p,
media::VideoCaptureFormat::ToString(p).c_str()));
}
-}
+} // namespace IPC

Powered by Google App Engine
This is Rietveld 408576698