Bug 679262 - Seeking to end of file during loadedmetadata event breaks further playback - r=cpearce
authorChris Double <chris.double@double.co.nz>
Mon, 29 Aug 2011 13:35:52 +1200
changeset 77484 9722cd5cd38f1d2665ab4229f8157e379a4bfdae
parent 77483 a6c42dc89a06263b3ae83badf6390e8a0fefc2f8
child 77485 f9638b44893ba8437a4137e5707d5c70cb94897b
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs679262
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 679262 - Seeking to end of file during loadedmetadata event breaks further playback - r=cpearce
content/media/nsBuiltinDecoder.cpp
content/media/test/test_fragment_play.html
--- a/content/media/nsBuiltinDecoder.cpp
+++ b/content/media/nsBuiltinDecoder.cpp
@@ -775,18 +775,18 @@ void nsBuiltinDecoder::SeekingStoppedAtE
 
     // An additional seek was requested while the current seek was
     // in operation.
     if (mRequestedSeekTime >= 0.0) {
       ChangeState(PLAY_STATE_SEEKING);
       seekWasAborted = PR_TRUE;
     } else {
       UnpinForSeek();
-      fireEnded = mNextState != PLAY_STATE_PLAYING;
-      ChangeState(fireEnded ? PLAY_STATE_ENDED : mNextState);
+      fireEnded = PR_TRUE;
+      ChangeState(PLAY_STATE_ENDED);
     }
   }
 
   if (mElement) {
     UpdateReadyStateForData();
     if (!seekWasAborted) {
       mElement->SeekCompleted();
       if (fireEnded) {
--- a/content/media/test/test_fragment_play.html
+++ b/content/media/test/test_fragment_play.html
@@ -18,17 +18,17 @@ var manager = new MediaTestManager;
 // try playing the video. Tests for other fragment
 // formats are in test_fragment_noplay.html.
 var gFragmentParams = [
   { fragment: "", start: null, end: null },
   { fragment: "#t=,", start: null, end: null },
   { fragment: "#t=3,3", start: null, end: null },
   { fragment: "#t=7,3", start: null, end: null },
   { fragment: "#t=7,15", start: 7, end: null },
-  { fragment: "#t=15,20", start: 9.287981, end: null, todo: "See Bug 679262" },
+  { fragment: "#t=15,20", start: 9.287981, end: null },
   { fragment: "#t=5", start: 5, end: null },
   { fragment: "#t=5.5", start: 5.5, end: null },
   { fragment: "#t=5,", start: null, end: null },
   { fragment: "#t=,5", start: 0, end: 5 },
   { fragment: "#t=2.5,5.5", start: 2.5, end: 5.5, todo: "See Bug 682141" },
   { fragment: "#t=1,2.5", start: 1, end: 2.5, todo: "See Bug 682141" },
   { fragment: "#t=,15", start: 0, end: null }
 ];