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

Unified Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc

Issue 1711563002: [Chromecast] Fix uninitialized data in ALSA mixer unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
index dbe841bd30e83704621a34a7ce9b9920679187f7..9017e1506b693fbf224a83aaa9837bb0ccf6c795 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc
@@ -179,8 +179,11 @@ class MockInputQueue : public StreamMixerAlsa::InputQueue {
void DoGetResampledData(::media::AudioBus* dest, int frames) {
CHECK(dest);
CHECK_GE(dest->frames(), frames);
- if (data_)
+ if (data_) {
data_->CopyPartialFramesTo(0, frames, 0, dest);
+ } else {
+ dest->ZeroFramesPartial(0, frames);
+ }
}
void DoPrepareToDelete(const OnReadyToDeleteCb& delete_cb) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698