Bug 135291 - [MSE] YouTube playback stalls & readyState drops to HAVE_CURRENT_DATA at end of stream with unbalanced buffered SourceBuffers
Summary: [MSE] YouTube playback stalls & readyState drops to HAVE_CURRENT_DATA at end ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-07-25 09:04 PDT by Jer Noble
Modified: 2014-07-26 01:52 PDT (History)
11 users (show)

See Also:


Attachments
Patch (13.47 KB, patch)
2014-07-25 10:55 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2 (502.70 KB, application/zip)
2014-07-25 11:58 PDT, Build Bot
no flags Details
Patch (14.58 KB, patch)
2014-07-25 13:26 PDT, Jer Noble
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2014-07-25 09:04:13 PDT
[MSE] Playback stalls & readyState drops to HAVE_CURRENT_DATA at end of stream with unbalanced buffered SourceBuffers
Comment 1 Jon Lee 2014-07-25 10:17:12 PDT
<rdar://problem/17715503>
Comment 2 Jer Noble 2014-07-25 10:55:52 PDT
Created attachment 235525 [details]
Patch
Comment 3 Jon Lee 2014-07-25 11:42:11 PDT
Comment on attachment 235525 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=235525&action=review

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:1462
> +        MediaTime start = length ? virtualRanges->end(length - 1) : MediaTime::zeroTime();

Is the added check necessary since an invalid index will return zeroTime() anyway?
Comment 4 Build Bot 2014-07-25 11:58:34 PDT
Comment on attachment 235525 [details]
Patch

Attachment 235525 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5917561690521600

New failing tests:
media/track/add-and-remove-track.html
Comment 5 Build Bot 2014-07-25 11:58:37 PDT
Created attachment 235535 [details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-09  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 6 Jer Noble 2014-07-25 13:26:03 PDT
Created attachment 235539 [details]
Patch
Comment 7 Sam Weinig 2014-07-25 14:39:43 PDT
Comment on attachment 235539 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=235539&action=review

> Source/WebCore/ChangeLog:3
> +        [MSE] Playback stalls & readyState drops to HAVE_CURRENT_DATA at end of stream with unbalanced buffered SourceBuffers

Please add the radar for future Sam's sake and also change the title to explain why this is important (aka Youtube is broken).

> Source/WebCore/platform/graphics/PlatformTimeRanges.h:54
>  
> +    MediaTime start(unsigned index) const;
>      MediaTime start(unsigned index, bool& valid) const;
> +    MediaTime end(unsigned index) const;
>      MediaTime end(unsigned index, bool& valid) const;
> +    MediaTime duration(unsigned index) const;
> +    MediaTime maximumBufferedTime() const;

You don't have to do this now, but you should eventually switch these to return Optional<MediaTime> if they can fail.
Comment 8 Jer Noble 2014-07-25 14:48:40 PDT
Comment on attachment 235539 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=235539&action=review

>> Source/WebCore/ChangeLog:3
>> +        [MSE] Playback stalls & readyState drops to HAVE_CURRENT_DATA at end of stream with unbalanced buffered SourceBuffers
> 
> Please add the radar for future Sam's sake and also change the title to explain why this is important (aka Youtube is broken).

Will do.

>> Source/WebCore/platform/graphics/PlatformTimeRanges.h:54
>> +    MediaTime maximumBufferedTime() const;
> 
> You don't have to do this now, but you should eventually switch these to return Optional<MediaTime> if they can fail.

Neat, I learned something new today.
Comment 9 Jer Noble 2014-07-25 15:39:26 PDT
Committed r171624: <http://trac.webkit.org/changeset/171624>