Bug 162052 - [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
Summary: [media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks: 161725
  Show dependency treegraph
 
Reported: 2016-09-16 00:36 PDT by Jer Noble
Modified: 2016-09-20 08:33 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.23 KB, patch)
2016-09-16 00:40 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (4.18 KB, patch)
2016-09-16 11:08 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2016-09-16 00:36:41 PDT
[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
Comment 1 Jer Noble 2016-09-16 00:40:39 PDT
Created attachment 289046 [details]
Patch
Comment 2 Jer Noble 2016-09-16 11:08:24 PDT
Created attachment 289079 [details]
Patch
Comment 3 Brent Fulgham 2016-09-16 11:31:21 PDT
Comment on attachment 289079 [details]
Patch

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

The change seems fine, though I'm curious if we can trust the rest of the trackBuffer's state if the 'lastEnqueuedPresentationTime' is invalid.

> Source/WebCore/Modules/mediasource/SourceBuffer.cpp:817
> +        if (trackBuffer.lastEnqueuedPresentationTime.isValid() && currentMediaTime < trackBuffer.lastEnqueuedPresentationTime) {

Is it safe to keep using the trackBuffer if the last enqueued presentation time is garbage? Would it be better to return or something? Or is that a 'normal' state for things to get into?
Comment 4 Jer Noble 2016-09-16 12:06:07 PDT
(In reply to comment #3)
> Comment on attachment 289079 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=289079&action=review
> 
> The change seems fine, though I'm curious if we can trust the rest of the
> trackBuffer's state if the 'lastEnqueuedPresentationTime' is invalid.
> 
> > Source/WebCore/Modules/mediasource/SourceBuffer.cpp:817
> > +        if (trackBuffer.lastEnqueuedPresentationTime.isValid() && currentMediaTime < trackBuffer.lastEnqueuedPresentationTime) {
> 
> Is it safe to keep using the trackBuffer if the last enqueued presentation
> time is garbage? Would it be better to return or something? Or is that a
> 'normal' state for things to get into?

That's a normal state; the lastEnqueuedPresentationTime starts out as invalid, and can get reset to invalid during the normal course of events.
Thanks!
Comment 5 WebKit Commit Bot 2016-09-16 12:27:39 PDT
Comment on attachment 289079 [details]
Patch

Clearing flags on attachment: 289079

Committed r206037: <http://trac.webkit.org/changeset/206037>
Comment 6 WebKit Commit Bot 2016-09-16 12:27:42 PDT
All reviewed patches have been landed.  Closing bug.