<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29133</bug_id>
          
          <creation_ts>2015-09-17 21:27:38 +0000</creation_ts>
          <short_desc>Reset Parser State algorithm, in &apos;sequence&apos; appendMode, should trigger potential discontinuity adjustment logic</short_desc>
          <delta_ts>2015-10-13 15:33:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Media Source Extensions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Wolenetz">wolenetz</reporter>
          <assigned_to name="Matt Wolenetz">wolenetz</assigned_to>
          <cc>jdsmith</cc>
    
    <cc>mike</cc>
    
    <cc>pcotton</cc>
    
    <cc>public-html-media</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>123249</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Wolenetz">wolenetz</who>
    <bug_when>2015-09-17 21:27:38 +0000</bug_when>
    <thetext>Currently, the following sequence of actions is allowed and produces strange results:
SourceBuffer.appendMode = sequence;
Append [0,10)
Abort
Append [100,110) // or Append [0,10) again

Without the Abort ( == reset parser state), the expected result would be:
[0,20) (assuming each append began with a random access point such that no frames were dropped).

With the Abort and the current Reset Parser State algorithm that is appendMode-agnostic, the result would be:
[0,10 with a large not-real-gap until 100,110)
// or in the alternate case:
[0,10) from the second Append [0,10).

I believe the correct way to fix this problem is to include the following step in the Reset Parser State algorithm:
&apos;If mode equals &quot;sequence&quot;: Set group start timestamp equal to the group end timestamp.&apos;

I will prepare a PR shortly for review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123250</commentid>
    <comment_count>1</comment_count>
    <who name="Matt Wolenetz">wolenetz</who>
    <bug_when>2015-09-17 22:04:02 +0000</bug_when>
    <thetext>PR is pending review at https://github.com/w3c/media-source/pull/9

Jerry, please take a look.

Thanks,
Matt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123251</commentid>
    <comment_count>2</comment_count>
    <who name="Matt Wolenetz">wolenetz</who>
    <bug_when>2015-09-17 22:42:44 +0000</bug_when>
    <thetext>fyi - Associated fix in Chromium is pending CR currently at https://codereview.chromium.org/1355673004/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123267</commentid>
    <comment_count>3</comment_count>
    <who name="Jerry Smith">jdsmith</who>
    <bug_when>2015-09-21 22:17:14 +0000</bug_when>
    <thetext>We see the same gap issue on sequence appends, and support making this change.  I can approve the PR if there are no other objections.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123280</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Wolenetz">wolenetz</who>
    <bug_when>2015-09-22 19:02:34 +0000</bug_when>
    <thetext>Thank you, Jerry. Note, if the PR is merged, I&apos;ll subsequently share another PR to add a related test to MSE wpt as part of fixing this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123680</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Cotton">pcotton</who>
    <bug_when>2015-10-13 15:33:31 +0000</bug_when>
    <thetext>Resolved  via https://github.com/w3c/media-source/pull/9</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>