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

Unified Diff: content/renderer/media/audio_device.cc

Issue 10806061: Initialize the shared memory to appease Valgrind. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix AudioDevice::AudioThreadCallback::Process which could touch uninitialized data. Created 8 years, 5 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 | content/renderer/media/audio_device_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_device.cc
diff --git a/content/renderer/media/audio_device.cc b/content/renderer/media/audio_device.cc
index 22fb7fc2a1662ef48e83f878b1d00e4a99083537..9936ebd4b387f71f989c88f4f5f3f31ed646f677 100644
--- a/content/renderer/media/audio_device.cc
+++ b/content/renderer/media/audio_device.cc
@@ -273,8 +273,7 @@ void AudioDevice::AudioThreadCallback::Process(int pending_data) {
// TODO(crogers/vrk): Figure out a way to avoid the float -> int -> float
// conversions that happen in the <audio> and WebRTC scenarios.
media::InterleaveFloatToInt(audio_data_, shared_memory_.memory(),
- audio_parameters_.frames_per_buffer(),
- audio_parameters_.bits_per_sample() / 8);
+ num_frames, audio_parameters_.bits_per_sample() / 8);
// Let the host know we are done.
media::SetActualDataSizeInBytes(&shared_memory_, memory_length_,
« no previous file with comments | « no previous file | content/renderer/media/audio_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698