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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1807053002: Speculative crash fix for media::RendererImpl::GetMediaTime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 4 years, 9 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: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 6e73a12fee07e1a5e1f957e705455686ef14ff7e..86ea61d376e86cab485584aa5ad4a6d22be262f0 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -863,8 +863,17 @@ void WebMediaPlayerImpl::OnCdmAttached(bool success) {
void WebMediaPlayerImpl::OnPipelineSeeked(bool time_updated) {
seeking_ = false;
seek_time_ = base::TimeDelta();
- if (paused_)
+ if (paused_) {
+#if defined(OS_ANDROID) // WMPI_CAST
+ if (isRemote()) {
+ paused_time_ = base::TimeDelta::FromSecondsD(cast_impl_.currentTime());
+ } else {
+ paused_time_ = pipeline_.GetMediaTime();
+ }
+#else
paused_time_ = pipeline_.GetMediaTime();
+#endif
+ }
if (time_updated)
should_notify_time_changed_ = true;
}
« 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