Index: remoting/client/plugin/pepper_audio_player.cc |
diff --git a/remoting/client/plugin/pepper_audio_player.cc b/remoting/client/plugin/pepper_audio_player.cc |
index dae8c1e9ba7099b1fb2e175d65be80ce8d5df44b..69fd252c97cee8ea99c9904b8c301b729ace6e73 100644 |
--- a/remoting/client/plugin/pepper_audio_player.cc |
+++ b/remoting/client/plugin/pepper_audio_player.cc |
@@ -81,6 +81,9 @@ void PepperAudioPlayer::ProcessAudioPacket(scoped_ptr<AudioPacket> packet) { |
CHECK_EQ(1, packet->data_size()); |
DCHECK_EQ(AudioPacket::ENCODING_RAW, packet->encoding()); |
+ DCHECK_NE(AudioPacket::SAMPLING_RATE_INVALID, packet->sampling_rate()); |
+ DCHECK_NE(AudioPacket::BYTES_PER_SAMPLE_INVALID, packet->bytes_per_sample()); |
Sergey Ulanov
2012/08/20 22:26:20
check that bytes_per_sample() == kSampleSizeBytes?
kxing
2012/08/20 22:48:22
Done.
|
+ DCHECK_NE(AudioPacket::CHANNELS_INVALID, packet->channels()); |
Sergey Ulanov
2012/08/20 22:26:20
I think you want to check that channels()==kChanne
kxing
2012/08/20 22:48:22
Done.
|
if (packet->data(0).size() % (kChannels * kSampleSizeBytes) != 0) { |
Sergey Ulanov
2012/08/20 22:26:20
add empty line above this one.
kxing
2012/08/20 22:48:22
Done.
|
LOG(WARNING) << "Received corrupted packet."; |
return; |