RESOLVED FIXED 209365
[MSE] Handle the case where AVStreamDataParser packages sync and non-sync samples together in a CMSampleBufferRef.
https://bugs.webkit.org/show_bug.cgi?id=209365
Summary [MSE] Handle the case where AVStreamDataParser packages sync and non-sync sam...
Jer Noble
Reported 2020-03-20 15:29:23 PDT
[MSE] Handle the case where AVStreamDataParser packages sync and non-sync samples together in a CMSampleBufferRef.
Attachments
Patch (9.82 KB, patch)
2020-03-20 15:36 PDT, Jer Noble
eric.carlson: review+
Patch for landing (9.95 KB, patch)
2020-03-20 16:02 PDT, Jer Noble
no flags
Jer Noble
Comment 1 2020-03-20 15:30:01 PDT
Jer Noble
Comment 2 2020-03-20 15:36:29 PDT
Eric Carlson
Comment 3 2020-03-20 15:57:11 PDT
Comment on attachment 394140 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=394140&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:342 > + CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(m_sample.get(), true); The documentation says CMSampleBufferGetSampleAttachmentsArray can return NULL, and some of our code does too (e.g. isCMSampleBufferNonDisplaying), so this should probably check. > Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:344 > + if (count == 1) <= 1 > Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:369 > + CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(m_sample.get(), true); > + auto count = CFArrayGetCount(attachmentsArray); > + if (count == 1) Ditto the comments above. > Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:377 > + Nit: the extra blank isn't really needed. > Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:399 > + if (CMSampleBufferCopySampleBufferForRange(kCFAllocatorDefault, m_sample.get(), range, &rawSample) != noErr || !rawSample) > + return { }; It would be good to log an error and maybe ASSERT
Jer Noble
Comment 4 2020-03-20 16:02:55 PDT
Created attachment 394143 [details] Patch for landing
EWS
Comment 5 2020-03-23 08:39:00 PDT
Committed r258846: <https://trac.webkit.org/changeset/258846> All reviewed patches have been landed. Closing bug and clearing flags on attachment 394143 [details].
Note You need to log in before you can comment on or make changes to this bug.