<?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>23553</bug_id>
          
          <creation_ts>2013-10-17 19:55:53 +0000</creation_ts>
          <short_desc>Segment parser loop appears to discard Media Segment header</short_desc>
          <delta_ts>2013-10-29 22:11:34 +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>All</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>minor</bug_severity>
          <target_milestone>LC</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Watson">watsonm</reporter>
          <assigned_to name="Aaron Colwell">acolwell</assigned_to>
          <cc>acolwell</cc>
    
    <cc>mike</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>94910</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2013-10-17 19:55:53 +0000</bug_when>
    <thetext>Section 3.5.1, step 6, if the input buffer does contain a complete media segment (sub-step 2) but it does not contain a complete coded frame, then the coded frame processing algorithm is not run and at sub-step 4 the media segment bytes (containing the header) are removed.

A possible fix would be to jump after sub-step 3 to the &apos;Need more data&apos; step if the entire media segment is not in the input buffer. The media segment data is then not discarded (and step 6 is not executed) until the entire segment is received.

This also obviates the need for the NOTE about incremental parsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94961</commentid>
    <comment_count>1</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2013-10-18 20:40:03 +0000</bug_when>
    <thetext>I&apos;ll figure out a way to reword this. I just want to make it clear that coded frame processing may begin before the end of the segment is actually received. I also think that it is important to make it clear that once a coded frame is processed, the data is not necessarily still available in the input buffer. That is why the current algorithm removes media segment data as it goes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95530</commentid>
    <comment_count>2</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2013-10-29 22:11:34 +0000</bug_when>
    <thetext>Change committed
https://dvcs.w3.org/hg/html-media/rev/15e7e8f7eecd

I basically went w/ Mark&apos;s suggestions, but put the new step after sub-step 4 instead of sub-step 3 so that the SourceBuffer can signal that it can&apos;t accept more data.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>