<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[237651] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/237651">237651</a></dd>
<dt>Author</dt> <dd>aboya@igalia.com</dd>
<dt>Date</dt> <dd>2018-10-31 14:04:07 -0700 (Wed, 31 Oct 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>[MSE] WebKit tests: Use fixed point in makeASample()
https://bugs.webkit.org/show_bug.cgi?id=191128

Reviewed by Jer Noble.

This patch modifies the utility function makeASample() so as to accept
time values in arbitrary time scales.

Previously makeASample() accepted optionally a time scale, but still
required to receive all time values as seconds, therefore requiring a
division at call time in order to use the function, which could cause
rounding errors (see https://bugs.webkit.org/show_bug.cgi?id=190085#c20).

* media/media-source/media-source-append-acb-no-frame-lost-expected.txt:
* media/media-source/media-source-append-acb-no-frame-lost.html:
* media/media-source/media-source-append-buffer-with-append-window.html:
* media/media-source/media-source-append-media-segment-without-init.html:
* media/media-source/media-source-append-nonsync-sample-after-abort.html:
* media/media-source/media-source-append-out-of-order.html:
* media/media-source/media-source-append-overlapping-dts-expected.txt:
* media/media-source/media-source-append-overlapping-dts.html:
* media/media-source/media-source-canplaythrough.html:
* media/media-source/media-source-duplicate-seeked.html:
* media/media-source/media-source-duration-after-append.html:
* media/media-source/media-source-end-of-stream-buffered.html:
* media/media-source/media-source-end-of-stream-readyState.html:
* media/media-source/media-source-fastseek.html:
* media/media-source/media-source-fudge-factor.html:
* media/media-source/media-source-monitor-source-buffers.html:
* media/media-source/media-source-overlapping-append-buffered.html:
* media/media-source/media-source-overlapping-append-expected.txt:
* media/media-source/media-source-overlapping-append.html:
* media/media-source/media-source-overlapping-decodetime-expected.txt:
* media/media-source/media-source-overlapping-decodetime.html:
* media/media-source/media-source-play.html:
* media/media-source/media-source-range-end-frame-not-removed-expected.txt:
* media/media-source/media-source-range-end-frame-not-removed.html:
* media/media-source/media-source-range-start-frame-replaced-expected.txt:
* media/media-source/media-source-range-start-frame-replaced.html:
* media/media-source/media-source-remove-decodeorder-crash.html:
* media/media-source/media-source-remove-too-much.html:
* media/media-source/media-source-remove.html:
* media/media-source/media-source-restrictions.html:
* media/media-source/media-source-sample-wrong-track-id.html:
* media/media-source/media-source-seek-back-expected.txt:
* media/media-source/media-source-seek-back.html:
* media/media-source/media-source-seek-complete.html:
* media/media-source/media-source-sequence-timestamps-expected.txt:
* media/media-source/media-source-sequence-timestamps.html:
* media/media-source/media-source-small-gap.html:
* media/media-source/media-source-timeoffset-expected.txt:
* media/media-source/media-source-timeoffset.html:
* media/media-source/media-source-timestampoffset-rounding-error.html:
* media/media-source/media-source-timestampoffset-then-zero-expected.txt:
* media/media-source/media-source-timestampoffset-then-zero.html:
* media/media-source/media-source-video-playback-quality.html:
* media/media-source/mock-media-source.js:
(makeASample):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendacbnoframelostexpectedtxt">trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendacbnoframelosthtml">trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendbufferwithappendwindowhtml">trunk/LayoutTests/media/media-source/media-source-append-buffer-with-append-window.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendmediasegmentwithoutinithtml">trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendnonsyncsampleafteraborthtml">trunk/LayoutTests/media/media-source/media-source-append-nonsync-sample-after-abort.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendoutoforderhtml">trunk/LayoutTests/media/media-source/media-source-append-out-of-order.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendoverlappingdtsexpectedtxt">trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceappendoverlappingdtshtml">trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcecanplaythroughhtml">trunk/LayoutTests/media/media-source/media-source-canplaythrough.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceduplicateseekedhtml">trunk/LayoutTests/media/media-source/media-source-duplicate-seeked.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcedurationafterappendhtml">trunk/LayoutTests/media/media-source/media-source-duration-after-append.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceendofstreambufferedhtml">trunk/LayoutTests/media/media-source/media-source-end-of-stream-buffered.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceendofstreamreadyStatehtml">trunk/LayoutTests/media/media-source/media-source-end-of-stream-readyState.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcefastseekhtml">trunk/LayoutTests/media/media-source/media-source-fastseek.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcefudgefactorhtml">trunk/LayoutTests/media/media-source/media-source-fudge-factor.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcemonitorsourcebuffershtml">trunk/LayoutTests/media/media-source/media-source-monitor-source-buffers.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceoverlappingappendbufferedhtml">trunk/LayoutTests/media/media-source/media-source-overlapping-append-buffered.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceoverlappingappendexpectedtxt">trunk/LayoutTests/media/media-source/media-source-overlapping-append-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceoverlappingappendhtml">trunk/LayoutTests/media/media-source/media-source-overlapping-append.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceoverlappingdecodetimeexpectedtxt">trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceoverlappingdecodetimehtml">trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceplayhtml">trunk/LayoutTests/media/media-source/media-source-play.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcerangeendframenotremovedexpectedtxt">trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcerangeendframenotremovedhtml">trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcerangestartframereplacedexpectedtxt">trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcerangestartframereplacedhtml">trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceremovedecodeordercrashhtml">trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceremovetoomuchhtml">trunk/LayoutTests/media/media-source/media-source-remove-too-much.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceremovehtml">trunk/LayoutTests/media/media-source/media-source-remove.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcerestrictionshtml">trunk/LayoutTests/media/media-source/media-source-restrictions.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcesamplewrongtrackidhtml">trunk/LayoutTests/media/media-source/media-source-sample-wrong-track-id.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceseekbackexpectedtxt">trunk/LayoutTests/media/media-source/media-source-seek-back-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceseekbackhtml">trunk/LayoutTests/media/media-source/media-source-seek-back.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourceseekcompletehtml">trunk/LayoutTests/media/media-source/media-source-seek-complete.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcesequencetimestampsexpectedtxt">trunk/LayoutTests/media/media-source/media-source-sequence-timestamps-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcesequencetimestampshtml">trunk/LayoutTests/media/media-source/media-source-sequence-timestamps.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcesmallgaphtml">trunk/LayoutTests/media/media-source/media-source-small-gap.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcetimeoffsetexpectedtxt">trunk/LayoutTests/media/media-source/media-source-timeoffset-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcetimeoffsethtml">trunk/LayoutTests/media/media-source/media-source-timeoffset.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcetimestampoffsetroundingerrorhtml">trunk/LayoutTests/media/media-source/media-source-timestampoffset-rounding-error.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcetimestampoffsetthenzeroexpectedtxt">trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcetimestampoffsetthenzerohtml">trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemediasourcevideoplaybackqualityhtml">trunk/LayoutTests/media/media-source/media-source-video-playback-quality.html</a></li>
<li><a href="#trunkLayoutTestsmediamediasourcemockmediasourcejs">trunk/LayoutTests/media/media-source/mock-media-source.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/ChangeLog 2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2018-10-31  Alicia Boya GarcĂ­a  <aboya@igalia.com>
+
+        [MSE] WebKit tests: Use fixed point in makeASample()
+        https://bugs.webkit.org/show_bug.cgi?id=191128
+
+        Reviewed by Jer Noble.
+
+        This patch modifies the utility function makeASample() so as to accept
+        time values in arbitrary time scales.
+
+        Previously makeASample() accepted optionally a time scale, but still
+        required to receive all time values as seconds, therefore requiring a
+        division at call time in order to use the function, which could cause
+        rounding errors (see https://bugs.webkit.org/show_bug.cgi?id=190085#c20).
+
+        * media/media-source/media-source-append-acb-no-frame-lost-expected.txt:
+        * media/media-source/media-source-append-acb-no-frame-lost.html:
+        * media/media-source/media-source-append-buffer-with-append-window.html:
+        * media/media-source/media-source-append-media-segment-without-init.html:
+        * media/media-source/media-source-append-nonsync-sample-after-abort.html:
+        * media/media-source/media-source-append-out-of-order.html:
+        * media/media-source/media-source-append-overlapping-dts-expected.txt:
+        * media/media-source/media-source-append-overlapping-dts.html:
+        * media/media-source/media-source-canplaythrough.html:
+        * media/media-source/media-source-duplicate-seeked.html:
+        * media/media-source/media-source-duration-after-append.html:
+        * media/media-source/media-source-end-of-stream-buffered.html:
+        * media/media-source/media-source-end-of-stream-readyState.html:
+        * media/media-source/media-source-fastseek.html:
+        * media/media-source/media-source-fudge-factor.html:
+        * media/media-source/media-source-monitor-source-buffers.html:
+        * media/media-source/media-source-overlapping-append-buffered.html:
+        * media/media-source/media-source-overlapping-append-expected.txt:
+        * media/media-source/media-source-overlapping-append.html:
+        * media/media-source/media-source-overlapping-decodetime-expected.txt:
+        * media/media-source/media-source-overlapping-decodetime.html:
+        * media/media-source/media-source-play.html:
+        * media/media-source/media-source-range-end-frame-not-removed-expected.txt:
+        * media/media-source/media-source-range-end-frame-not-removed.html:
+        * media/media-source/media-source-range-start-frame-replaced-expected.txt:
+        * media/media-source/media-source-range-start-frame-replaced.html:
+        * media/media-source/media-source-remove-decodeorder-crash.html:
+        * media/media-source/media-source-remove-too-much.html:
+        * media/media-source/media-source-remove.html:
+        * media/media-source/media-source-restrictions.html:
+        * media/media-source/media-source-sample-wrong-track-id.html:
+        * media/media-source/media-source-seek-back-expected.txt:
+        * media/media-source/media-source-seek-back.html:
+        * media/media-source/media-source-seek-complete.html:
+        * media/media-source/media-source-sequence-timestamps-expected.txt:
+        * media/media-source/media-source-sequence-timestamps.html:
+        * media/media-source/media-source-small-gap.html:
+        * media/media-source/media-source-timeoffset-expected.txt:
+        * media/media-source/media-source-timeoffset.html:
+        * media/media-source/media-source-timestampoffset-rounding-error.html:
+        * media/media-source/media-source-timestampoffset-then-zero-expected.txt:
+        * media/media-source/media-source-timestampoffset-then-zero.html:
+        * media/media-source/media-source-video-playback-quality.html:
+        * media/media-source/mock-media-source.js:
+        (makeASample):
+
</ins><span class="cx"> 2018-10-31  YUHAN WU  <yuhan_wu@apple.com>
</span><span class="cx"> 
</span><span class="cx">         MediaRecorder should fire dataavailable event when all tracks are ended and stop() is called
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendacbnoframelostexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost-expected.txt  2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost-expected.txt     2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -12,35 +12,35 @@
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '30') OK
</span><span class="cx"> EXPECTED (enqueuedSamples.length == '30') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({4000/1000 = 4.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({5000/1000 = 5.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({6000/1000 = 6.000000}), DTS({6000/1000 = 6.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({7000/1000 = 7.000000}), DTS({7000/1000 = 7.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({8000/1000 = 8.000000}), DTS({8000/1000 = 8.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({9000/1000 = 9.000000}), DTS({9000/1000 = 9.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({10000/1000 = 10.000000}), DTS({10000/1000 = 10.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({11000/1000 = 11.000000}), DTS({11000/1000 = 11.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({12000/1000 = 12.000000}), DTS({12000/1000 = 12.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({13000/1000 = 13.000000}), DTS({13000/1000 = 13.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({14000/1000 = 14.000000}), DTS({14000/1000 = 14.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({15000/1000 = 15.000000}), DTS({15000/1000 = 15.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({16000/1000 = 16.000000}), DTS({16000/1000 = 16.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({17000/1000 = 17.000000}), DTS({17000/1000 = 17.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({18000/1000 = 18.000000}), DTS({18000/1000 = 18.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({19000/1000 = 19.000000}), DTS({19000/1000 = 19.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({20000/1000 = 20.000000}), DTS({20000/1000 = 20.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({21000/1000 = 21.000000}), DTS({21000/1000 = 21.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({22000/1000 = 22.000000}), DTS({22000/1000 = 22.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({23000/1000 = 23.000000}), DTS({23000/1000 = 23.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({24000/1000 = 24.000000}), DTS({24000/1000 = 24.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({25000/1000 = 25.000000}), DTS({25000/1000 = 25.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({26000/1000 = 26.000000}), DTS({26000/1000 = 26.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({27000/1000 = 27.000000}), DTS({27000/1000 = 27.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({28000/1000 = 28.000000}), DTS({28000/1000 = 28.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({29000/1000 = 29.000000}), DTS({29000/1000 = 29.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({4/1 = 4.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({5/1 = 5.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({6/1 = 6.000000}), DTS({6/1 = 6.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({7/1 = 7.000000}), DTS({7/1 = 7.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({8/1 = 8.000000}), DTS({8/1 = 8.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({9/1 = 9.000000}), DTS({9/1 = 9.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({10/1 = 10.000000}), DTS({10/1 = 10.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({11/1 = 11.000000}), DTS({11/1 = 11.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({12/1 = 12.000000}), DTS({12/1 = 12.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({13/1 = 13.000000}), DTS({13/1 = 13.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({14/1 = 14.000000}), DTS({14/1 = 14.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({15/1 = 15.000000}), DTS({15/1 = 15.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({16/1 = 16.000000}), DTS({16/1 = 16.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({17/1 = 17.000000}), DTS({17/1 = 17.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({18/1 = 18.000000}), DTS({18/1 = 18.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({19/1 = 19.000000}), DTS({19/1 = 19.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({20/1 = 20.000000}), DTS({20/1 = 20.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({21/1 = 21.000000}), DTS({21/1 = 21.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({22/1 = 22.000000}), DTS({22/1 = 22.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({23/1 = 23.000000}), DTS({23/1 = 23.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({24/1 = 24.000000}), DTS({24/1 = 24.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({25/1 = 25.000000}), DTS({25/1 = 25.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({26/1 = 26.000000}), DTS({26/1 = 26.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({27/1 = 27.000000}), DTS({27/1 = 27.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({28/1 = 28.000000}), DTS({28/1 = 28.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({29/1 = 29.000000}), DTS({29/1 = 29.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendacbnoframelosthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost.html  2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-acb-no-frame-lost.html     2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">     function syncSampleRun(start, end) {
</span><span class="cx">         const samples = [];
</span><span class="cx">         for (let time = start; time < end; time++)
</span><del>-            samples.push(makeASample(time, time, 1, 1, time === start ? SAMPLE_FLAG.SYNC : SAMPLE_FLAG.NONE));
</del><ins>+            samples.push(makeASample(time, time, 1, 1, 1, time === start ? SAMPLE_FLAG.SYNC : SAMPLE_FLAG.NONE));
</ins><span class="cx">         return concatenateSamples(samples);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendbufferwithappendwindowhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-buffer-with-append-window.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-buffer-with-append-window.html  2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-buffer-with-append-window.html     2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -18,22 +18,22 @@
</span><span class="cx"> 
</span><span class="cx">         mediaSegment = concatenateSamples([
</span><span class="cx">             makeAInit(0, [makeATrack(1, 'mock', TRACK_KIND.VIDEO)])
</span><del>-            , makeASample(0,  0,  1, 1, SAMPLE_FLAG.SYNC, 0)
-            , makeASample(1,  1,  1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(2,  2,  1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(3,  3,  1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(4,  4,  1, 1, SAMPLE_FLAG.SYNC, 0)
-            , makeASample(5,  5,  1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(6,  6,  1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(7,  7,  1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(8,  8,  1, 1, SAMPLE_FLAG.SYNC, 0)
-            , makeASample(9,  9,  1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(10, 10, 1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(11, 11, 1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(12, 12, 1, 1, SAMPLE_FLAG.SYNC, 0)
-            , makeASample(13, 13, 1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(14, 14, 1, 1, SAMPLE_FLAG.NONE, 0)
-            , makeASample(15, 15, 1, 1, SAMPLE_FLAG.NONE, 0)
</del><ins>+            , makeASample(0,  0,  1, 1, 1, SAMPLE_FLAG.SYNC, 0)
+            , makeASample(1,  1,  1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(2,  2,  1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(3,  3,  1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(4,  4,  1, 1, 1, SAMPLE_FLAG.SYNC, 0)
+            , makeASample(5,  5,  1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(6,  6,  1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(7,  7,  1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(8,  8,  1, 1, 1, SAMPLE_FLAG.SYNC, 0)
+            , makeASample(9,  9,  1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(10, 10, 1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(11, 11, 1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(12, 12, 1, 1, 1, SAMPLE_FLAG.SYNC, 0)
+            , makeASample(13, 13, 1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(14, 14, 1, 1, 1, SAMPLE_FLAG.NONE, 0)
+            , makeASample(15, 15, 1, 1, 1, SAMPLE_FLAG.NONE, 0)
</ins><span class="cx">         ]);
</span><span class="cx"> 
</span><span class="cx">         source = new MediaSource();
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendmediasegmentwithoutinithtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init.html 2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init.html    2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx">         // initSegment = makeAInit(0, [makeATrack(1, 'mock', TRACK_KIND.VIDEO)]);
</span><span class="cx"> 
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE),
</ins><span class="cx">         ]);
</span><span class="cx"> 
</span><span class="cx">         // Note: if code correctly handles sample without init, it will go through Segment Parser Loop
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendnonsyncsampleafteraborthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-nonsync-sample-after-abort.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-nonsync-sample-after-abort.html 2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-nonsync-sample-after-abort.html    2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         sourceBuffer.appendBuffer(
</span><del>-            makeASample(nextRequest, nextRequest, 1, 1,
</del><ins>+            makeASample(nextRequest, nextRequest, 1, 1, 1,
</ins><span class="cx">             (nextRequest == 0) ? SAMPLE_FLAG.SYNC : SAMPLE_FLAG.NONE
</span><span class="cx">             ));
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendoutoforderhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-out-of-order.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-out-of-order.html       2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-out-of-order.html  2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">     function syncSampleRun(start, end) {
</span><span class="cx">         const samples = [];
</span><span class="cx">         for (let time = start; time < end; time++)
</span><del>-            samples.push(makeASample(time, time, 1, 1, time === start ? SAMPLE_FLAG.SYNC : SAMPLE_FLAG.NONE));
</del><ins>+            samples.push(makeASample(time, time, 1, 1, 1, time === start ? SAMPLE_FLAG.SYNC : SAMPLE_FLAG.NONE));
</ins><span class="cx">         return concatenateSamples(samples);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendoverlappingdtsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts-expected.txt    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts-expected.txt       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -10,14 +10,14 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '9') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({4000/1000 = 4.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({6000/1000 = 6.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({7000/1000 = 7.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
-{PTS({4000/1000 = 4.000000}), DTS({6000/1000 = 6.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
-{PTS({5000/1000 = 5.000000}), DTS({7000/1000 = 7.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({4/1 = 4.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({6/1 = 6.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({7/1 = 7.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
+{PTS({4/1 = 4.000000}), DTS({6/1 = 6.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
+{PTS({5/1 = 5.000000}), DTS({7/1 = 7.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceappendoverlappingdtshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-append-overlapping-dts.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -27,23 +27,23 @@
</span><span class="cx">         await waitFor(sourceBuffer, 'updateend');
</span><span class="cx"> 
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(6, 6, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(7, 7, 1, 1, SAMPLE_FLAG.NONE, 0),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(6, 6, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(7, 7, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="cx">         await waitFor(sourceBuffer, 'updateend');
</span><span class="cx"> 
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(6, 4, 1, 1, SAMPLE_FLAG.SYNC, 1),
-            makeASample(7, 5, 1, 1, SAMPLE_FLAG.NONE, 1),
-            makeASample(4, 6, 1, 1, SAMPLE_FLAG.NONE, 1),
-            makeASample(5, 7, 1, 1, SAMPLE_FLAG.NONE, 1),
</del><ins>+            makeASample(6, 4, 1, 1, 1, SAMPLE_FLAG.SYNC, 1),
+            makeASample(7, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
+            makeASample(4, 6, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
+            makeASample(5, 7, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
</ins><span class="cx">         ]);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="cx">         await waitFor(sourceBuffer, 'updateend');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcecanplaythroughhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-canplaythrough.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-canplaythrough.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-canplaythrough.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     {
</span><span class="cx">         source.activeSourceBuffers.length;
</span><span class="cx">         if (nextRequest < totalLength) {
</span><del>-            sourceBuffer.appendBuffer(makeASample(nextRequest, nextRequest, 1, 1, SAMPLE_FLAG.SYNC));
</del><ins>+            sourceBuffer.appendBuffer(makeASample(nextRequest, nextRequest, 1, 1, 1, SAMPLE_FLAG.SYNC));
</ins><span class="cx">             ++nextRequest;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceduplicateseekedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-duplicate-seeked.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-duplicate-seeked.html  2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-duplicate-seeked.html     2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 1, 1, 1, SAMPLE_FLAG.SYNC),
</del><ins>+            makeASample(0, 1, 1, 1, 1, SAMPLE_FLAG.SYNC),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', seek, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcedurationafterappendhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-duration-after-append.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-duration-after-append.html     2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-duration-after-append.html        2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         testExpected('video.duration', 0);
</span><del>-        sample = makeASample(0, 0, 10, 1, SAMPLE_FLAG.SYNC);
</del><ins>+        sample = makeASample(0, 0, 10, 1, 1, SAMPLE_FLAG.SYNC);
</ins><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', checkDuration, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(sample)');
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceendofstreambufferedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-end-of-stream-buffered.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-end-of-stream-buffered.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-end-of-stream-buffered.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">         waitForEventOn(sourceBuffer1, 'updateend', updateEndInit1);
</span><span class="cx">         mediaSegment = concatenateSamples([
</span><span class="cx">             makeAInit(10, [makeATrack(1, 'mock', TRACK_KIND.AUDIO)]), 
</span><del>-            makeASample(0, 0, 10, 1, SAMPLE_FLAG.SYNC, 0),
</del><ins>+            makeASample(0, 0, 10, 1, 1, SAMPLE_FLAG.SYNC, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         run('sourceBuffer1.appendBuffer(mediaSegment)');
</span><span class="cx">     }
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">         waitForEventOn(sourceBuffer2, 'updateend', updateEndInit2);
</span><span class="cx">         mediaSegment = concatenateSamples([
</span><span class="cx">             makeAInit(10, [makeATrack(1, 'mock', TRACK_KIND.VIDEO)]),
</span><del>-            makeASample(0, 0, 5, 1, SAMPLE_FLAG.SYNC, 0),
</del><ins>+            makeASample(0, 0, 5, 1, 1, SAMPLE_FLAG.SYNC, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         run('sourceBuffer2.appendBuffer(mediaSegment)');
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceendofstreamreadyStatehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-end-of-stream-readyState.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-end-of-stream-readyState.html  2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-end-of-stream-readyState.html     2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', updateEnd1, false, true);
</span><span class="cx">         mediaSegment = concatenateSamples([
</span><span class="cx">             makeAInit(10, [makeATrack(1, 'mock', TRACK_KIND.VIDEO)]),
</span><del>-            makeASample(0, 0, 5, 1, SAMPLE_FLAG.SYNC, 0),
</del><ins>+            makeASample(0, 0, 5, 1, 1, SAMPLE_FLAG.SYNC, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         run('sourceBuffer.appendBuffer(mediaSegment)');
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcefastseekhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-fastseek.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-fastseek.html  2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-fastseek.html     2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -35,14 +35,14 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(6, 6, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(7, 7, 1, 1, SAMPLE_FLAG.NONE),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(6, 6, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(7, 7, 1, 1, 1, SAMPLE_FLAG.NONE),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', play, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcefudgefactorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-fudge-factor.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-fudge-factor.html      2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-fudge-factor.html 2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx">     function loadedMetadata() {
</span><span class="cx">         consoleWrite('Samples with presentation times after currentTime should not cause loadedData.');
</span><del>-        sourceBuffer.appendBuffer(makeASample(0.5, 0.5, 0.5, 1, SAMPLE_FLAG.SYNC));
</del><ins>+        sourceBuffer.appendBuffer(makeASample(500, 500, 500, 1000, 1, SAMPLE_FLAG.SYNC));
</ins><span class="cx">         setTimeout(notLoadedData, 50);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">         testExpected('video.readyState', HTMLMediaElement.HAVE_METADATA);
</span><span class="cx"> 
</span><span class="cx">         consoleWrite('Samples with presentation times very close to currentTime should cause loadedData.');
</span><del>-        sourceBuffer.appendBuffer(makeASample(0.01, 0.01, 0.01, 1, SAMPLE_FLAG.SYNC));
</del><ins>+        sourceBuffer.appendBuffer(makeASample(10, 10, 10, 1000, 1, SAMPLE_FLAG.SYNC));
</ins><span class="cx">         waitForEvent('loadeddata', loadedData);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">         testExpected('video.readyState', HTMLMediaElement.HAVE_CURRENT_DATA);
</span><span class="cx"> 
</span><span class="cx">         consoleWrite('Samples with presentation end times very close to currentTime should not cause canPlay.');
</span><del>-        sourceBuffer.appendBuffer(makeASample(0.02, 0.02, 0.01, 1, SAMPLE_FLAG.SYNC));
</del><ins>+        sourceBuffer.appendBuffer(makeASample(20, 20, 10, 1000, 1, SAMPLE_FLAG.SYNC));
</ins><span class="cx">         setTimeout(notCanPlay, 50);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">         testExpected('video.readyState', HTMLMediaElement.HAVE_CURRENT_DATA);
</span><span class="cx"> 
</span><span class="cx">         consoleWrite('Continuous samples with presentation end times after currentTime should cause canPlay.');
</span><del>-        sourceBuffer.appendBuffer(makeASample(0.03, 0.03, 0.47, 1, SAMPLE_FLAG.SYNC));
</del><ins>+        sourceBuffer.appendBuffer(makeASample(30, 30, 470, 1000, 1, SAMPLE_FLAG.SYNC));
</ins><span class="cx">         waitForEvent('canplay', canPlay);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcemonitorsourcebuffershtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-monitor-source-buffers.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-monitor-source-buffers.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-monitor-source-buffers.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples()
</span><span class="cx">     {
</span><del>-        sample = makeASample(0, 0, 10, 1, SAMPLE_FLAG.SYNC);
</del><ins>+        sample = makeASample(0, 0, 10, 1, 1, SAMPLE_FLAG.SYNC);
</ins><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', play, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(sample)');
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceoverlappingappendbufferedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-overlapping-append-buffered.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-overlapping-append-buffered.html       2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-overlapping-append-buffered.html  2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -35,12 +35,12 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(1, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(2, 1, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(3, 2, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(4, 3, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(6, 4, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE),
</del><ins>+            makeASample(1, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(2, 1, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(3, 2, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(4, 3, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(6, 4, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadMoreSamples, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="lines">@@ -48,12 +48,12 @@
</span><span class="cx"> 
</span><span class="cx">     function loadMoreSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(1, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(2, 1, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(3, 2, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(4, 3, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(6, 4, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE),
</del><ins>+            makeASample(1, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(2, 1, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(3, 2, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(4, 3, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(6, 4, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadComplete, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceoverlappingappendexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-overlapping-append-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-overlapping-append-expected.txt        2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-overlapping-append-expected.txt   2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -7,29 +7,29 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '6') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({4000/1000 = 4.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({5000/1000 = 5.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({4/1 = 4.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({5/1 = 5.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
</ins><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '6') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({4000/1000 = 4.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
-{PTS({5000/1000 = 5.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({4/1 = 4.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
+{PTS({5/1 = 5.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
</ins><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '6') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(2)}
-{PTS({2000/1000 = 2.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(2)}
-{PTS({1000/1000 = 1.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(2)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(2)}
-{PTS({5000/1000 = 5.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(2)}
-{PTS({4000/1000 = 4.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(2)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(2)}
+{PTS({2/1 = 2.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(0), generation(2)}
+{PTS({1/1 = 1.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(2)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(2)}
+{PTS({5/1 = 5.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(0), generation(2)}
+{PTS({4/1 = 4.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(0), generation(2)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceoverlappingappendhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-overlapping-append.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-overlapping-append.html        2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-overlapping-append.html   2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -34,12 +34,12 @@
</span><span class="cx">     function loadOrderedSamples()
</span><span class="cx">     {
</span><span class="cx">        samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE, 0),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadMoreOrderedSamples, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="lines">@@ -52,12 +52,12 @@
</span><span class="cx">         bufferedSamples.forEach(consoleWrite);
</span><span class="cx"> 
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 1),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE, 1),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.SYNC, 1),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.NONE, 1),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE, 1),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 1),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.SYNC, 1),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadUnorderedSamples, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="lines">@@ -70,12 +70,12 @@
</span><span class="cx">         bufferedSamples.forEach(consoleWrite);
</span><span class="cx"> 
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 2),
-            makeASample(2, 1, 1, 1, SAMPLE_FLAG.NONE, 2),
-            makeASample(1, 2, 1, 1, SAMPLE_FLAG.NONE, 2),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.SYNC, 2),
-            makeASample(5, 4, 1, 1, SAMPLE_FLAG.NONE, 2),
-            makeASample(4, 5, 1, 1, SAMPLE_FLAG.NONE, 2),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 2),
+            makeASample(2, 1, 1, 1, 1, SAMPLE_FLAG.NONE, 2),
+            makeASample(1, 2, 1, 1, 1, SAMPLE_FLAG.NONE, 2),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.SYNC, 2),
+            makeASample(5, 4, 1, 1, 1, SAMPLE_FLAG.NONE, 2),
+            makeASample(4, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 2),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', samplesAdded, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceoverlappingdecodetimeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime-expected.txt    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime-expected.txt       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -9,12 +9,12 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '7') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({4000/1000 = 4.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({5000/1000 = 5.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
-{PTS({6000/1000 = 6.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(1)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({4/1 = 4.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({5/1 = 5.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
+{PTS({6/1 = 6.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(0), generation(1)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceoverlappingdecodetimehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-overlapping-decodetime.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -34,12 +34,12 @@
</span><span class="cx">     function loadOrderedSamples()
</span><span class="cx">     {
</span><span class="cx">        samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE, 0),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadMoreOrderedSamples, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="lines">@@ -48,9 +48,9 @@
</span><span class="cx">     function loadMoreOrderedSamples()
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(4, 3, 1, 1, SAMPLE_FLAG.SYNC, 1),
-            makeASample(5, 4, 1, 1, SAMPLE_FLAG.NONE, 1),
-            makeASample(6, 5, 1, 1, SAMPLE_FLAG.NONE, 1),
</del><ins>+            makeASample(4, 3, 1, 1, 1, SAMPLE_FLAG.SYNC, 1),
+            makeASample(5, 4, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
+            makeASample(6, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 1),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', samplesAdded, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceplayhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-play.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-play.html      2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-play.html 2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><del>-        sample = makeASample(0, 0, 10, 1, SAMPLE_FLAG.SYNC);
</del><ins>+        sample = makeASample(0, 0, 10, 1, 1, SAMPLE_FLAG.SYNC);
</ins><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', play, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(sample)');
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcerangeendframenotremovedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed-expected.txt       2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed-expected.txt  2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -9,12 +9,12 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '6') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({4000/1000 = 4.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({5000/1000 = 5.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({4/1 = 4.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({5/1 = 5.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
</ins><span class="cx"> EXPECTED (sourceBuffer.buffered.length == '1') OK
</span><span class="cx"> EXPECTED (sourceBuffer.buffered.start(0) == '0') OK
</span><span class="cx"> EXPECTED (sourceBuffer.buffered.end(0) == '6') OK
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcerangeendframenotremovedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed.html       2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-range-end-frame-not-removed.html  2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx">     function loadSamples1()
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.SYNC, 0),
</del><ins>+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadSamples2, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="lines">@@ -45,9 +45,9 @@
</span><span class="cx">     function loadSamples2()
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.SYNC, 0),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', samplesAdded, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcerangestartframereplacedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced-expected.txt        2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced-expected.txt   2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -8,8 +8,8 @@
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({2000/1000 = 2.000000}), flags(1), generation(0)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({2/1 = 2.000000}), flags(1), generation(0)}
</ins><span class="cx"> EXPECTED (sourceBuffer.buffered.length == '1') OK
</span><span class="cx"> EXPECTED (sourceBuffer.buffered.start(0) == '0') OK
</span><span class="cx"> EXPECTED (sourceBuffer.buffered.end(0) == '3') OK
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcerangestartframereplacedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced.html        2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-range-start-frame-replaced.html   2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">     function loadSamples1()
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
</del><ins>+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadSamples2, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="lines">@@ -44,8 +44,8 @@
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><span class="cx">             // New Coded Frame Group (DTS went backwards)
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(1, 1, 2, 1, SAMPLE_FLAG.SYNC, 0), // duration = 2
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(1, 1, 2, 1, 1, SAMPLE_FLAG.SYNC, 0), // duration = 2
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', samplesAdded, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceremovedecodeordercrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html  2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-remove-decodeorder-crash.html     2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -29,9 +29,9 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(2, 1, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(1, 2, 1, 1, SAMPLE_FLAG.SYNC),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(2, 1, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(1, 2, 1, 1, 1, SAMPLE_FLAG.SYNC),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', remove, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceremovetoomuchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-remove-too-much.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-remove-too-much.html   2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-remove-too-much.html      2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -29,15 +29,15 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(6, 6, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(7, 7, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(8, 8, 1, 1, SAMPLE_FLAG.SYNC),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(6, 6, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(7, 7, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(8, 8, 1, 1, 1, SAMPLE_FLAG.SYNC),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', remove, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceremovehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-remove.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-remove.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-remove.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -29,14 +29,14 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(6, 6, 1, 1, SAMPLE_FLAG.NONE),
-            makeASample(7, 7, 1, 1, SAMPLE_FLAG.NONE),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(6, 6, 1, 1, 1, SAMPLE_FLAG.NONE),
+            makeASample(7, 7, 1, 1, 1, SAMPLE_FLAG.NONE),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', remove, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcerestrictionshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-restrictions.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-restrictions.html      2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-restrictions.html 2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -43,14 +43,14 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSamples() {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(6, 6, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(7, 7, 1, 1, SAMPLE_FLAG.SYNC),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(6, 6, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(7, 7, 1, 1, 1, SAMPLE_FLAG.SYNC),
</ins><span class="cx">         ]);
</span><span class="cx"> 
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', updateEnd, false, true);
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcesamplewrongtrackidhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-sample-wrong-track-id.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-sample-wrong-track-id.html     2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-sample-wrong-track-id.html        2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -27,8 +27,8 @@
</span><span class="cx">         consoleWrite('Append a set of invalid, overlapping samples. Should not crash.')
</span><span class="cx">         mediaSegment = concatenateSamples([
</span><span class="cx">             makeAInit(2, [makeATrack(1, 'mock', TRACK_KIND.AUDIO)]), 
</span><del>-            makeASample(1, 1, 1, 2, SAMPLE_FLAG.SYNC, 0),
-            makeASample(1, 0, 2, 2, SAMPLE_FLAG.SYNC, 0),
</del><ins>+            makeASample(1, 1, 1, 1, 2, SAMPLE_FLAG.SYNC, 0),
+            makeASample(1, 0, 2, 1, 2, SAMPLE_FLAG.SYNC, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         run('sourceBuffer.appendBuffer(mediaSegment)');
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceseekbackexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-seek-back-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-seek-back-expected.txt 2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-seek-back-expected.txt    2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -12,6 +12,6 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(seeked)
</span><span class="cx"> EXPECTED (enqueuedSamples.length == '1') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceseekbackhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-seek-back.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-seek-back.html 2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-seek-back.html    2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     function loadSamples()
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(10, 10, 1, 1, SAMPLE_FLAG.SYNC),
</del><ins>+            makeASample(10, 10, 1, 1, 1, SAMPLE_FLAG.SYNC),
</ins><span class="cx">         ]);
</span><span class="cx">         consoleWrite('Append a sample from 10 -> 11')
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', seek, false, true);
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     function seeking()
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
</ins><span class="cx">         ]);
</span><span class="cx">         consoleWrite('Append a sample from 0 -> 1')
</span><span class="cx">         waitForEvent('seeked', seeked);
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourceseekcompletehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-seek-complete.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-seek-complete.html     2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-seek-complete.html        2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">     function loadSamples()
</span><span class="cx">     {
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(10, 10, 1, 1, SAMPLE_FLAG.SYNC),
</del><ins>+            makeASample(10, 10, 1, 1, 1, SAMPLE_FLAG.SYNC),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', seek, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcesequencetimestampsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-sequence-timestamps-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-sequence-timestamps-expected.txt       2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-sequence-timestamps-expected.txt  2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -7,11 +7,11 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '6') OK
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({4000/1000 = 4.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({5000/1000 = 5.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({4/1 = 4.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({5/1 = 5.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcesequencetimestampshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-sequence-timestamps.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-sequence-timestamps.html       2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-sequence-timestamps.html  2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -39,12 +39,12 @@
</span><span class="cx">     {
</span><span class="cx">         // In "sequence" mode, the samples' timestamps are not used
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(6, 6, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(8, 8, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(10, 10, 1, 1, SAMPLE_FLAG.NONE, 0),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(6, 6, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(8, 8, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(10, 10, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', samplesAdded, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcesmallgaphtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-small-gap.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-small-gap.html 2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-small-gap.html    2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -31,14 +31,14 @@
</span><span class="cx">         const maximumGap = Math.floor(2002 / 24000 * 1000) / 1000;
</span><span class="cx"> 
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1 - maximumGap,      1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1 - maximumGap / 2,  1, SAMPLE_FLAG.NONE),
-            makeASample(2, 2, 1 - maximumGap / 3,  1, SAMPLE_FLAG.NONE),
-            makeASample(3, 3, 1,                   1, SAMPLE_FLAG.NONE),
-            makeASample(4, 4, 1 - maximumGap,      1, SAMPLE_FLAG.SYNC),
-            makeASample(5, 5, 1 - maximumGap / 10, 1, SAMPLE_FLAG.NONE),
-            makeASample(6, 6, 0.99,                1, SAMPLE_FLAG.NONE),
-            makeASample(7, 7, 1,                   1, SAMPLE_FLAG.NONE),
</del><ins>+            makeASample(   0,    0, 1000 * (1 - maximumGap),      1000, 1, SAMPLE_FLAG.SYNC),
+            makeASample(1000, 1000, 1000 * (1 - maximumGap / 2),  1000, 1, SAMPLE_FLAG.NONE),
+            makeASample(2000, 2000, 1000 * (1 - maximumGap / 3),  1000, 1, SAMPLE_FLAG.NONE),
+            makeASample(3000, 3000, 1000,                         1000, 1, SAMPLE_FLAG.NONE),
+            makeASample(4000, 4000, 1000 * (1 - maximumGap),      1000, 1, SAMPLE_FLAG.SYNC),
+            makeASample(5000, 5000, 1000 * (1 - maximumGap / 10), 1000, 1, SAMPLE_FLAG.NONE),
+            makeASample(6000, 6000, 1000 * (0.99),                1000, 1, SAMPLE_FLAG.NONE),
+            makeASample(7000, 7000, 1000,                         1000, 1, SAMPLE_FLAG.NONE),
</ins><span class="cx">         ]);
</span><span class="cx"> 
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', checkBuffered, false, true);
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcetimeoffsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-timeoffset-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-timeoffset-expected.txt        2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-timeoffset-expected.txt   2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -8,11 +8,11 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(samples))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> EXPECTED (bufferedSamples.length == '6') OK
</span><del>-{PTS({10000/1000 = 10.000000}), DTS({10000/1000 = 10.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({11000/1000 = 11.000000}), DTS({11000/1000 = 11.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({12000/1000 = 12.000000}), DTS({12000/1000 = 12.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({13000/1000 = 13.000000}), DTS({13000/1000 = 13.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({14000/1000 = 14.000000}), DTS({14000/1000 = 14.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
-{PTS({15000/1000 = 15.000000}), DTS({15000/1000 = 15.000000}), duration({1000/1000 = 1.000000}), flags(0), generation(0)}
</del><ins>+{PTS({10/1 = 10.000000}), DTS({10/1 = 10.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({11/1 = 11.000000}), DTS({11/1 = 11.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({12/1 = 12.000000}), DTS({12/1 = 12.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({13/1 = 13.000000}), DTS({13/1 = 13.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({14/1 = 14.000000}), DTS({14/1 = 14.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
+{PTS({15/1 = 15.000000}), DTS({15/1 = 15.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcetimeoffsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-timeoffset.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-timeoffset.html        2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-timeoffset.html   2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -34,12 +34,12 @@
</span><span class="cx">     function loadSamples()
</span><span class="cx">     {
</span><span class="cx">        samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(3, 3, 1, 1, SAMPLE_FLAG.SYNC, 0),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.NONE, 0),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.NONE, 0),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(3, 3, 1, 1, 1, SAMPLE_FLAG.SYNC, 0),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.NONE, 0),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', samplesAdded, false, true);
</span><span class="cx">         run('sourceBuffer.timestampOffset = 10');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcetimestampoffsetroundingerrorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-timestampoffset-rounding-error.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-timestampoffset-rounding-error.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-timestampoffset-rounding-error.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> 
</span><span class="cx">         const samples = [];
</span><span class="cx">         for (let time = 0; time < 2 * timeScale; time++)
</span><del>-            samples.push(makeASample(time / timeScale, time / timeScale, 1 / timeScale, 1, time % 2 === 0 ? SAMPLE_FLAG.SYNC : SAMPLE_FLAG.NONE, generation, timeScale));
</del><ins>+            samples.push(makeASample(time, time, 1, timeScale, 1, time % 2 === 0 ? SAMPLE_FLAG.SYNC : SAMPLE_FLAG.NONE, generation));
</ins><span class="cx"> 
</span><span class="cx">         return concatenateSamples([init].concat(samples));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcetimestampoffsetthenzeroexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero-expected.txt (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero-expected.txt 2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero-expected.txt    2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -6,54 +6,54 @@
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(makeSimpleAudio(0, 20, 0)))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> After first append:
</span><del>-{PTS({5000/1000 = 5.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({6000/1000 = 6.000000}), DTS({6000/1000 = 6.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({7000/1000 = 7.000000}), DTS({7000/1000 = 7.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({8000/1000 = 8.000000}), DTS({8000/1000 = 8.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({9000/1000 = 9.000000}), DTS({9000/1000 = 9.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({10000/1000 = 10.000000}), DTS({10000/1000 = 10.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({11000/1000 = 11.000000}), DTS({11000/1000 = 11.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({12000/1000 = 12.000000}), DTS({12000/1000 = 12.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({13000/1000 = 13.000000}), DTS({13000/1000 = 13.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({14000/1000 = 14.000000}), DTS({14000/1000 = 14.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({15000/1000 = 15.000000}), DTS({15000/1000 = 15.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({16000/1000 = 16.000000}), DTS({16000/1000 = 16.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({17000/1000 = 17.000000}), DTS({17000/1000 = 17.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({18000/1000 = 18.000000}), DTS({18000/1000 = 18.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({19000/1000 = 19.000000}), DTS({19000/1000 = 19.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({20000/1000 = 20.000000}), DTS({20000/1000 = 20.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({21000/1000 = 21.000000}), DTS({21000/1000 = 21.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({22000/1000 = 22.000000}), DTS({22000/1000 = 22.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({23000/1000 = 23.000000}), DTS({23000/1000 = 23.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({24000/1000 = 24.000000}), DTS({24000/1000 = 24.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
</del><ins>+{PTS({5/1 = 5.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({6/1 = 6.000000}), DTS({6/1 = 6.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({7/1 = 7.000000}), DTS({7/1 = 7.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({8/1 = 8.000000}), DTS({8/1 = 8.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({9/1 = 9.000000}), DTS({9/1 = 9.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({10/1 = 10.000000}), DTS({10/1 = 10.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({11/1 = 11.000000}), DTS({11/1 = 11.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({12/1 = 12.000000}), DTS({12/1 = 12.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({13/1 = 13.000000}), DTS({13/1 = 13.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({14/1 = 14.000000}), DTS({14/1 = 14.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({15/1 = 15.000000}), DTS({15/1 = 15.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({16/1 = 16.000000}), DTS({16/1 = 16.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({17/1 = 17.000000}), DTS({17/1 = 17.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({18/1 = 18.000000}), DTS({18/1 = 18.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({19/1 = 19.000000}), DTS({19/1 = 19.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({20/1 = 20.000000}), DTS({20/1 = 20.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({21/1 = 21.000000}), DTS({21/1 = 21.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({22/1 = 22.000000}), DTS({22/1 = 22.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({23/1 = 23.000000}), DTS({23/1 = 23.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({24/1 = 24.000000}), DTS({24/1 = 24.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
</ins><span class="cx"> RUN(sourceBuffer.timestampOffset = 0)
</span><span class="cx"> RUN(sourceBuffer.appendBuffer(makeSimpleAudio(0, 20, 1)))
</span><span class="cx"> EVENT(updateend)
</span><span class="cx"> After second append:
</span><del>-{PTS({0/1000 = 0.000000}), DTS({0/1000 = 0.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({1000/1000 = 1.000000}), DTS({1000/1000 = 1.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({2000/1000 = 2.000000}), DTS({2000/1000 = 2.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({3000/1000 = 3.000000}), DTS({3000/1000 = 3.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({4000/1000 = 4.000000}), DTS({4000/1000 = 4.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({5000/1000 = 5.000000}), DTS({5000/1000 = 5.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({6000/1000 = 6.000000}), DTS({6000/1000 = 6.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({7000/1000 = 7.000000}), DTS({7000/1000 = 7.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({8000/1000 = 8.000000}), DTS({8000/1000 = 8.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({9000/1000 = 9.000000}), DTS({9000/1000 = 9.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({10000/1000 = 10.000000}), DTS({10000/1000 = 10.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({11000/1000 = 11.000000}), DTS({11000/1000 = 11.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({12000/1000 = 12.000000}), DTS({12000/1000 = 12.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({13000/1000 = 13.000000}), DTS({13000/1000 = 13.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({14000/1000 = 14.000000}), DTS({14000/1000 = 14.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({15000/1000 = 15.000000}), DTS({15000/1000 = 15.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({16000/1000 = 16.000000}), DTS({16000/1000 = 16.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({17000/1000 = 17.000000}), DTS({17000/1000 = 17.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({18000/1000 = 18.000000}), DTS({18000/1000 = 18.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({19000/1000 = 19.000000}), DTS({19000/1000 = 19.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(1)}
-{PTS({20000/1000 = 20.000000}), DTS({20000/1000 = 20.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({21000/1000 = 21.000000}), DTS({21000/1000 = 21.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({22000/1000 = 22.000000}), DTS({22000/1000 = 22.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({23000/1000 = 23.000000}), DTS({23000/1000 = 23.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
-{PTS({24000/1000 = 24.000000}), DTS({24000/1000 = 24.000000}), duration({1000/1000 = 1.000000}), flags(1), generation(0)}
</del><ins>+{PTS({0/1 = 0.000000}), DTS({0/1 = 0.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({4/1 = 4.000000}), DTS({4/1 = 4.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({5/1 = 5.000000}), DTS({5/1 = 5.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({6/1 = 6.000000}), DTS({6/1 = 6.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({7/1 = 7.000000}), DTS({7/1 = 7.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({8/1 = 8.000000}), DTS({8/1 = 8.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({9/1 = 9.000000}), DTS({9/1 = 9.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({10/1 = 10.000000}), DTS({10/1 = 10.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({11/1 = 11.000000}), DTS({11/1 = 11.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({12/1 = 12.000000}), DTS({12/1 = 12.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({13/1 = 13.000000}), DTS({13/1 = 13.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({14/1 = 14.000000}), DTS({14/1 = 14.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({15/1 = 15.000000}), DTS({15/1 = 15.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({16/1 = 16.000000}), DTS({16/1 = 16.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({17/1 = 17.000000}), DTS({17/1 = 17.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({18/1 = 18.000000}), DTS({18/1 = 18.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({19/1 = 19.000000}), DTS({19/1 = 19.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
+{PTS({20/1 = 20.000000}), DTS({20/1 = 20.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({21/1 = 21.000000}), DTS({21/1 = 21.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({22/1 = 22.000000}), DTS({22/1 = 22.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({23/1 = 23.000000}), DTS({23/1 = 23.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
+{PTS({24/1 = 24.000000}), DTS({24/1 = 24.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcetimestampoffsetthenzerohtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero.html 2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-timestampoffset-then-zero.html    2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx"> 
</span><span class="cx">         const samples = [];
</span><span class="cx">         for (let time = start; time < end; time++)
</span><del>-            samples.push(makeASample(time, time, 1, 1, SAMPLE_FLAG.SYNC, generation));
</del><ins>+            samples.push(makeASample(time, time, 1, 1, 1, SAMPLE_FLAG.SYNC, generation));
</ins><span class="cx"> 
</span><span class="cx">         return concatenateSamples([init].concat(samples));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemediasourcevideoplaybackqualityhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/media-source-video-playback-quality.html (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/media-source-video-playback-quality.html    2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/media-source-video-playback-quality.html       2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx">     function loadSample()
</span><span class="cx">     {
</span><del>-        samples = concatenateSamples([makeASample(0, 0, 1, 1, SAMPLE_FLAG.NONE)]);
</del><ins>+        samples = concatenateSamples([makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.NONE)]);
</ins><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', loadMoreSamples, false, true);
</span><span class="cx">         consoleWrite('Test that beginning a buffer with a non-sync sample results in that sample being dropped.')
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span><span class="lines">@@ -48,13 +48,13 @@
</span><span class="cx">         testExpected('quality.totalFrameDelay', 0);
</span><span class="cx"> 
</span><span class="cx">         samples = concatenateSamples([
</span><del>-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.CORRUPTED),
-            makeASample(2, 2, 1, 1, SAMPLE_FLAG.DROPPED),
-            makeASample(4, 4, 1, 1, SAMPLE_FLAG.DELAYED),
-            makeASample(5, 5, 1, 1, SAMPLE_FLAG.DELAYED),
-            makeASample(6, 6, 1, 1, SAMPLE_FLAG.DELAYED),
-            makeASample(7, 7, 1, 1, SAMPLE_FLAG.NONE),
</del><ins>+            makeASample(0, 0, 1, 1, 1, SAMPLE_FLAG.SYNC),
+            makeASample(1, 1, 1, 1, 1, SAMPLE_FLAG.CORRUPTED),
+            makeASample(2, 2, 1, 1, 1, SAMPLE_FLAG.DROPPED),
+            makeASample(4, 4, 1, 1, 1, SAMPLE_FLAG.DELAYED),
+            makeASample(5, 5, 1, 1, 1, SAMPLE_FLAG.DELAYED),
+            makeASample(6, 6, 1, 1, 1, SAMPLE_FLAG.DELAYED),
+            makeASample(7, 7, 1, 1, 1, SAMPLE_FLAG.NONE),
</ins><span class="cx">         ]);
</span><span class="cx">         waitForEventOn(sourceBuffer, 'updateend', samplesAdded, false, true);
</span><span class="cx">         run('sourceBuffer.appendBuffer(samples)');
</span></span></pre></div>
<a id="trunkLayoutTestsmediamediasourcemockmediasourcejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/media-source/mock-media-source.js (237650 => 237651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/media-source/mock-media-source.js        2018-10-31 20:26:57 UTC (rev 237650)
+++ trunk/LayoutTests/media/media-source/mock-media-source.js   2018-10-31 21:04:07 UTC (rev 237651)
</span><span class="lines">@@ -16,9 +16,7 @@
</span><span class="cx">     DELAYED: 1 << 3,
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-function makeASample(presentationTime, decodeTime, duration, trackID, flags, generation, timeScale) {
-    if (typeof timeScale === 'undefined')
-        timeScale = 1000
</del><ins>+function makeASample(presentationTime, decodeTime, duration, timeScale, trackID, flags, generation) {
</ins><span class="cx">     var byteLength = 30;
</span><span class="cx">     var buffer = new ArrayBuffer(byteLength);
</span><span class="cx">     var array = new Uint8Array(buffer);
</span><span class="lines">@@ -27,9 +25,9 @@
</span><span class="cx">     var view = new DataView(buffer);
</span><span class="cx">     view.setUint32(4, byteLength, true);
</span><span class="cx">     view.setInt32(8, timeScale, true);
</span><del>-    view.setInt32(12, presentationTime * timeScale, true);
-    view.setInt32(16, decodeTime * timeScale, true);
-    view.setInt32(20, duration * timeScale, true);
</del><ins>+    view.setInt32(12, presentationTime, true);
+    view.setInt32(16, decodeTime, true);
+    view.setInt32(20, duration, true);
</ins><span class="cx">     view.setInt32(24, trackID, true);
</span><span class="cx">     view.setUint8(28, flags);
</span><span class="cx">     view.setUint8(29, generation);
</span></span></pre>
</div>
</div>

</body>
</html>