Bug 1065215 - Fix EME test for changes to MediaSource::endOfStream - r=cpearce

--HG--
extra : rebase_source : b4592fc1c0686a6bb5014a744e605e89f1342645
This commit is contained in:
Chris Double 2014-11-19 17:16:59 +13:00
Родитель d37876d9b3
Коммит 10c71caa7c
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -121,6 +121,15 @@ function PlayFragmented(test, elem, token)
var curFragment = 0;
function addNextFragment() {
/* We can get another updateevent as a result of calling ms.endOfStream() if
the highest end time of our source buffers is different from that of the
media source duration. Due to bug 1065207 this can happen because of
inaccuracies in the frame duration calculations. Check if we are already
"ended" and ignore the update event */
if (ms.readyState == "ended") {
return;
}
if (curFragment >= test.fragments.length) {
Log(token, "addNextFragment() end of stream");
ms.endOfStream();