Index: media/base/pipeline.cc |
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc |
index 46be2b86e6809c592bc554fefdf8ee456b76b14d..8fbc094c1ac0b56f32af4c513009fad9dbbbdaf1 100644 |
--- a/media/base/pipeline.cc |
+++ b/media/base/pipeline.cc |
@@ -743,17 +743,21 @@ void Pipeline::SeekTask(TimeDelta time, const PipelineStatusCB& seek_cb) { |
DCHECK(seek_cb_.is_null()); |
SetState(kSeeking); |
- base::TimeDelta seek_timestamp = std::max(time, demuxer_->GetStartTime()); |
seek_cb_ = seek_cb; |
audio_ended_ = false; |
video_ended_ = false; |
text_ended_ = false; |
+ // Adjust the seek timestamp by the start time (which may be negative). Don't |
+ // use this value with SetTime() since it maps to a [0, duration] based |
+ // timeline instead of a [start_time, duration + start_time] one internally. |
+ const base::TimeDelta seek_timestamp = time + demuxer_->GetStartTime(); |
+ |
// Kick off seeking! |
{ |
base::AutoLock auto_lock(lock_); |
PauseClockAndStopRendering_Locked(); |
- clock_->SetTime(seek_timestamp, seek_timestamp); |
+ clock_->SetTime(time, time); |
acolwell GONE FROM CHROMIUM
2014/06/09 23:14:46
This makes me really nervous and I'm pretty sure i
|
} |
DoSeek(seek_timestamp, base::Bind( |
&Pipeline::OnStateTransition, base::Unretained(this))); |