Backed out changeset 8f414f372ae0 (bug 1112438) for B2G mochitest-12 crashes.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 05 Feb 2015 14:22:06 -0500
changeset 227677 57731c479755a61b410972e6e80f0b14db649777
parent 227676 eb62964be633ffa1e3825010860b83f0f279a138
child 227678 1774e3c48a0daa3f1c997d6e00088a628854772b
push id13703
push userryanvm@gmail.com
push dateThu, 05 Feb 2015 19:22:10 +0000
treeherderb2g-inbound@57731c479755 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1112438
milestone38.0a1
backs out8f414f372ae0e141ac003b191ba86dabb17e1f66
Backed out changeset 8f414f372ae0 (bug 1112438) for B2G mochitest-12 crashes.
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2545,28 +2545,17 @@ MediaDecoderStateMachine::SeekCompleted(
   int64_t newCurrentTime = mCurrentSeekTarget.mTime;
 
   // Setup timestamp state.
   VideoData* video = VideoQueue().PeekFront();
   if (seekTime == mEndTime) {
     newCurrentTime = mAudioStartTime = seekTime;
   } else if (HasAudio()) {
     AudioData* audio = AudioQueue().PeekFront();
-    mAudioStartTime = audio ? audio->mTime : seekTime;
-
-    // Though we adjust the newCurrentTime in audio-based, and supplemented
-    // by video. For better UX, should not bind the slide position to
-    // mAudioStartTime directly.
-    // While seeking to a position where there's only either audio or video,
-    // Need to check the seekTime is bounded in audio duration. See Bug 1112438.
-    if (audio && audio->mTime <= seekTime && seekTime < audio->GetEndTime()) {
-      newCurrentTime = audio->mTime;
-    } else {
-      newCurrentTime = video ? video->mTime : seekTime;
-    }
+    newCurrentTime = mAudioStartTime = audio ? audio->mTime : seekTime;
   } else {
     newCurrentTime = video ? video->mTime : seekTime;
   }
   mPlayDuration = newCurrentTime - mStartTime;
 
   if (HasVideo()) {
     if (video) {
       {