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

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

Issue 2677643002: [Chromecast] Fix unit test failures due to underflow. (Closed)
Patch Set: Created 3 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 | chromecast/media/cma/backend/multizone_backend_unittest.cc » ('j') | 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_input_impl.cc
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc
index 6df49ef5e834d9f46b19ac4852b875559fd53506..656130bed534469bea6c3c3510c2195860853d9d 100644
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc
@@ -208,6 +208,10 @@ MediaPipelineBackendAlsa::RenderingDelay StreamMixerAlsaInputImpl::QueueData(
queued_frames_including_resampler_ += frames;
}
+ if (is_underflowing_) {
+ return MediaPipelineBackendAlsa::RenderingDelay();
+ }
+
MediaPipelineBackendAlsa::RenderingDelay delay = mixer_rendering_delay_;
if (delay.timestamp_microseconds != kNoTimestamp) {
delay.delay_microseconds += static_cast<int64_t>(
« no previous file with comments | « no previous file | chromecast/media/cma/backend/multizone_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698