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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>177483</bug_id>
          
          <creation_ts>2017-09-26 03:51:23 -0700</creation_ts>
          <short_desc>Appending media to the start of a buffer range drops buffer after the append.</short_desc>
          <delta_ts>2019-09-20 15:35:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Safari 10</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Bryer">robert.bryer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jeremyj-wk</cc>
    
    <cc>jer.noble</cc>
    
    <cc>jesus</cc>
    
    <cc>jonlee</cc>
    
    <cc>peng.liu6</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1352629</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Bryer">robert.bryer</who>
    <bug_when>2017-09-26 03:51:23 -0700</bug_when>
    <thetext>When appending media to the start of a buffered range, webkit will remove a portion of buffer after the append, keeping the buffer as two separate ranges.

To reproduce:
http://reference.dashif.org/dash.js/v2.6.0/samples/dash-if-reference-player/index.html

1. Click load.
2. Seek forward to a time like 3:00, await some buffer at this time.
3. Seek back to 2:45, play until 3:00.
4. Observe that there is a gap in the buffer at the first segment downloaded(between 176 and 178).

When appending the segment again to fill the gap, a new gap appears at the next segment boundary, and so on - effectively meaning we need to replace all the buffered media from 3:00 onwards.

The fact that the above example doesn&apos;t play out is our fault(we should be checking .buffered when deciding what to fetch, and we have a fix already for this so we can make it play). But we probably shouldn&apos;t need to replace all the buffer ahead after seeking backwards. What&apos;s going on here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1561646</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-08-15 11:24:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/54354873&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571396</commentid>
    <comment_count>2</comment_count>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2019-09-16 19:59:14 -0700</bug_when>
    <thetext>Hi Robert, is this bug still reproducible? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1572710</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Bryer">robert.bryer</who>
    <bug_when>2019-09-20 02:50:41 -0700</bug_when>
    <thetext>On Safari 12.1.2 I can&apos;t reproduce it, it looks fixed - It was reported for a Safari 10 version though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1572927</commentid>
    <comment_count>4</comment_count>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2019-09-20 15:35:17 -0700</bug_when>
    <thetext>Great! Thanks for the information.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>