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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2930333004: Stop assuming metadata contains at least one stream (Closed)
Patch Set: Created 3 years, 6 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/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index c6188abcc7c279c0a80eecdcf279ee7026432b9f..073decac2b844b411cd38a1bfa37ac8fa523d93d 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -2303,6 +2303,9 @@ void WebMediaPlayerImpl::ScheduleIdlePauseTimer() {
}
void WebMediaPlayerImpl::CreateWatchTimeReporter() {
+ if (!HasVideo() && !HasAudio())
+ return;
+
// Create the watch time reporter and synchronize its initial state.
watch_time_reporter_.reset(
new WatchTimeReporter(HasAudio(), HasVideo(), !!chunk_demuxer_,
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698