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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 1305273007: Don't short-circuit MSE seeks in WebMediaPlayer impls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 fb50bc3f5a4e850e9ac4bf8dcd5f19bc5e43cb94..f6b8c9adfacd99d7a06d3edc4e9e44e1614ec8fd 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -329,11 +329,16 @@ void WebMediaPlayerImpl::seek(double seconds) {
media_log_->AddEvent(media_log_->CreateSeekEvent(seconds));
// Update our paused time.
- // In paused state ignore the seek operations to current time if the loading
- // is completed and generate OnPipelineBufferingStateChanged event to
- // eventually fire seeking and seeked events
+ // For non-MSE playbacks, in paused state ignore the seek operations to
+ // current time if the loading is completed and generate
+ // OnPipelineBufferingStateChanged event to eventually fire seeking and seeked
+ // events. We don't short-circuit MSE seeks in this logic because the
+ // underlying buffers around the seek time might have changed (or even been
+ // removed) since previous seek/preroll/pause action, and the pipeline might
+ // need to flush so the new buffers are decoded and rendered instead of the
+ // old ones.
if (paused_) {
- if (paused_time_ != new_seek_time) {
+ if (paused_time_ != new_seek_time || chunk_demuxer_) {
paused_time_ = new_seek_time;
} else if (old_state == ReadyStateHaveEnoughData) {
main_task_runner_->PostTask(
« 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