Bug 136958

Summary: [MSE][Mac] work around AVSampleBufferRenderSynchronizer early callbacks
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: ASSIGNED ---    
Severity: Normal CC: cdumez, jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch.
none
Rebased patch none

Description Eric Carlson 2014-09-19 13:13:03 PDT
AVSampleBufferRenderSynchronizer can sometimes call a boundary time observer early. When this happens for the duration time observer, seek the synchronizer to to the duration so HTMLMediaElement sees that playback has stopped because currentTime is equal to duration.
Comment 1 Eric Carlson 2014-09-19 13:13:26 PDT
<rdar://problem/17998261>
Comment 2 Eric Carlson 2014-09-19 13:19:39 PDT
Created attachment 238386 [details]
Proposed patch.
Comment 3 Eric Carlson 2014-09-19 13:29:07 PDT
Created attachment 238387 [details]
Rebased patch
Comment 4 Eric Carlson 2014-09-19 13:55:17 PDT
Committed r173771 - http://trac.webkit.org/changeset/173771
Comment 5 Chris Dumez 2014-09-19 15:24:53 PDT
I seem to be getting the following build error after this change:
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:646:19: error: variable 'duration' cannot be implicitly captured in a lambda with no capture-default specified
        if (now < duration) {
Comment 6 Jer Noble 2014-09-19 16:00:09 PDT
Landed a follow-up build fix in r173777 <http://trac.webkit.org/r173777>.