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

Unified Diff: media/renderers/audio_renderer_impl.cc

Issue 1137323005: Don't return wall clock times when time isn't ticking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include sink_playing_. Created 5 years, 7 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 | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl.cc
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc
index d17a0689134d6075491a70e18b66fb5d0d63a9a6..fe439e25b4edbc2baadd629bd759f8770d5fef82 100644
--- a/media/renderers/audio_renderer_impl.cc
+++ b/media/renderers/audio_renderer_impl.cc
@@ -170,8 +170,10 @@ bool AudioRendererImpl::GetWallClockTimes(
const std::vector<base::TimeDelta>& media_timestamps,
std::vector<base::TimeTicks>* wall_clock_times) {
base::AutoLock auto_lock(lock_);
- if (last_render_ticks_.is_null() || !playback_rate_)
+ if (last_render_ticks_.is_null() || !playback_rate_ ||
+ buffering_state_ != BUFFERING_HAVE_ENOUGH || !sink_playing_) {
return false;
+ }
DCHECK(wall_clock_times->empty());
wall_clock_times->reserve(media_timestamps.size());
« no previous file with comments | « no previous file | media/renderers/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698