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

Unified Diff: media/base/pipeline.cc

Issue 740663002: Relanding 'Ignore seek operations to the current time in pause state' patch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed duration change callback Created 6 years, 1 month 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 059710525372976dad8118a21e144fc6542d154c..989eb8f0adba3c08ea3625daf54c5c9b4812bc62 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -634,6 +634,11 @@ void Pipeline::RunEndedCallbackIfNeeded() {
if (text_renderer_ && text_renderer_->HasTracks() && !text_renderer_ended_)
return;
+ // Correct the duration if current time is less
+ TimeDelta media_time = renderer_->GetMediaTime();
+ if (media_time < duration_) {
+ duration_ = media_time;
philipj_slow 2014/11/25 10:01:04 Shouldn't this be SetDuration(media_time), or what
Srirama 2014/11/25 10:19:29 I have done a similar thing in patchset4, but ther
philipj_slow 2014/11/25 12:24:29 By only setting duration_, I guess HTMLMediaElemen
+ }
DCHECK_EQ(status_, PIPELINE_OK);
ended_cb_.Run();
}
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698