Summary: | [MediaStream] Limit the number of remote video samples queued | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||
Component: | Media | Assignee: | Eric Carlson <eric.carlson> | ||||||
Status: | ASSIGNED --- | ||||||||
Severity: | Normal | CC: | commit-queue, webkit-bug-importer, youennf | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Other | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Eric Carlson
2017-07-14 09:26:13 PDT
Created attachment 315435 [details]
Proposed patch.
Comment on attachment 315435 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=315435&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:263 > + if (!queue.first()->decodeTime().isValid()) { I applied the patch locally to check whether decodeTime is invalid in the case of RealtimeIncomingVideoSource. It is valid but is negative. At least on my Mac, we are not going through that loop. We will probably go through the next while loop and empty the queue there. Is it different on iOS? (In reply to youenn fablet from comment #3) > Comment on attachment 315435 [details] > Proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=315435&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:263 > > + if (!queue.first()->decodeTime().isValid()) { > > I applied the patch locally to check whether decodeTime is invalid in the > case of RealtimeIncomingVideoSource. > It is valid but is negative. At least on my Mac, we are not going through > that loop. > We will probably go through the next while loop and empty the queue there. > Is it different on iOS? While the raw PTS time is negative in the CMSampleBuffer: (lldb) po (CMSampleBuffer)0x00007f88b20ca290 CMSampleBuffer 0x7f88b20ca290 retainCount: 1 allocator: 0x7fff8383df40 ... numSamples = 1 sampleTimingArray[1] = { {PTS = {-1/1 = -1.000}, DTS = {-1/1 = -1.000}, duration = {INVALID}}, } sampleAttachmentsArray[0] = { sample 0: DisplayImmediately = true } imageBuffer = 0x7f88b5c2f140 "decodeTime" is invalid: (lldb) p mediaSample.decodeTime() (WTF::MediaTime) $11 = { Invalid } { = (m_timeValue = 0, m_timeValueAsDouble = 0) m_timeScale = 0 m_timeFlags = '\0' } (lldb) p mediaSample.decodeTime().isValid() (bool) $12 = false But we should probably also check explicitly for negative times as well. Created attachment 315457 [details]
Patch for landing.
Comment on attachment 315457 [details] Patch for landing. Clearing flags on attachment: 315457 Committed r219513: <http://trac.webkit.org/changeset/219513> |