Loading content/media/video/src/nsChannelReader.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ size_t nsChannelReader::io_read(char* aBuffer, size_t aCount) { PRUint32 bytes = 0; nsresult rv = mStream.Read(aBuffer, aCount, &bytes); if (!NS_SUCCEEDED(rv) || bytes == 0) { if (!NS_SUCCEEDED(rv)) { return static_cast<size_t>(OGGZ_ERR_SYSTEM); } mCurrentPosition += bytes; Loading content/media/video/test/Makefile.in +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/rules.mk _TEST_FILES = test_autoplay.html \ test_bug461281.html \ test_constants.html \ test_controls.html \ test_currentTime.html \ Loading @@ -68,6 +69,7 @@ _TEST_FILES = test_autoplay.html \ test_timeupdate3.html \ test_volume.html \ 320x240.ogg \ bug461281.ogg \ seek.ogg \ # test_bug448534.html \ $(NULL) Loading content/media/video/test/test_bug461281.html 0 → 100644 +49 −0 Original line number Diff line number Diff line <!DOCTYPE HTML> <html> <head> <title>Media test: Bug 461281 - Ogg Streams with eof marker</title> <script type="text/javascript" src="/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> </head> <body> <video id='v' src='bug461281.ogg' onloadedmetadata='return startTest();' onended='return playbackEnded();'></video> <pre id="test"> <script class="testbody" type="text/javascript"> // Test if the ended event occurs with media without an eos marker var v = document.getElementById('v'); var endPassed = false; var completed = false; var timeout; function startTest() { if (completed) return false; v.play(); return false; } function playbackEnded() { if (completed) return false completed = true; ok(v.ended, "Checking playback has ended"); clearTimeout(timeout); SimpleTest.finish(); return false; } timeout = setTimeout(function () { ok(false, "Test timed out"); SimpleTest.finish(); }, 30000); SimpleTest.waitForExplicitFinish(); </script> </pre> </body> </html> Loading
content/media/video/src/nsChannelReader.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ size_t nsChannelReader::io_read(char* aBuffer, size_t aCount) { PRUint32 bytes = 0; nsresult rv = mStream.Read(aBuffer, aCount, &bytes); if (!NS_SUCCEEDED(rv) || bytes == 0) { if (!NS_SUCCEEDED(rv)) { return static_cast<size_t>(OGGZ_ERR_SYSTEM); } mCurrentPosition += bytes; Loading
content/media/video/test/Makefile.in +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/config/rules.mk _TEST_FILES = test_autoplay.html \ test_bug461281.html \ test_constants.html \ test_controls.html \ test_currentTime.html \ Loading @@ -68,6 +69,7 @@ _TEST_FILES = test_autoplay.html \ test_timeupdate3.html \ test_volume.html \ 320x240.ogg \ bug461281.ogg \ seek.ogg \ # test_bug448534.html \ $(NULL) Loading
content/media/video/test/test_bug461281.html 0 → 100644 +49 −0 Original line number Diff line number Diff line <!DOCTYPE HTML> <html> <head> <title>Media test: Bug 461281 - Ogg Streams with eof marker</title> <script type="text/javascript" src="/MochiKit/MochiKit.js"></script> <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> </head> <body> <video id='v' src='bug461281.ogg' onloadedmetadata='return startTest();' onended='return playbackEnded();'></video> <pre id="test"> <script class="testbody" type="text/javascript"> // Test if the ended event occurs with media without an eos marker var v = document.getElementById('v'); var endPassed = false; var completed = false; var timeout; function startTest() { if (completed) return false; v.play(); return false; } function playbackEnded() { if (completed) return false completed = true; ok(v.ended, "Checking playback has ended"); clearTimeout(timeout); SimpleTest.finish(); return false; } timeout = setTimeout(function () { ok(false, "Test timed out"); SimpleTest.finish(); }, 30000); SimpleTest.waitForExplicitFinish(); </script> </pre> </body> </html>