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

Unified Diff: media/audio/audio_parameters.cc

Issue 1211273005: Use safer IPC serializations in media_param_traits.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up unit tests Created 5 years, 6 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 | « media/audio/audio_parameters.h ('k') | media/audio/cras/cras_input_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_parameters.cc
diff --git a/media/audio/audio_parameters.cc b/media/audio/audio_parameters.cc
index c9dcdeb7e5f6ce66db2c93c7dbd6ecb490f3db67..872413f808379b92ad460be125340d26b7735c6a 100644
--- a/media/audio/audio_parameters.cc
+++ b/media/audio/audio_parameters.cc
@@ -68,12 +68,8 @@ void AudioParameters::Reset(Format format, ChannelLayout channel_layout,
}
bool AudioParameters::IsValid() const {
- return (format_ >= AUDIO_PCM_LINEAR) &&
- (format_ < AUDIO_LAST_FORMAT) &&
- (channels_ > 0) &&
- (channels_ <= media::limits::kMaxChannels) &&
+ return (channels_ > 0) && (channels_ <= media::limits::kMaxChannels) &&
(channel_layout_ > CHANNEL_LAYOUT_UNSUPPORTED) &&
- (channel_layout_ <= CHANNEL_LAYOUT_MAX) &&
(sample_rate_ >= media::limits::kMinSampleRate) &&
(sample_rate_ <= media::limits::kMaxSampleRate) &&
(bits_per_sample_ > 0) &&
« no previous file with comments | « media/audio/audio_parameters.h ('k') | media/audio/cras/cras_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698