[MSE][Mac] Null-deref in CMSampleBufferIsRandomAccess().
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Dec 2013 00:56:39 +0000 (00:56 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Dec 2013 00:56:39 +0000 (00:56 +0000)
commit4d8c0a468e5008604245668de3be6f3d8300f2e5
tree6ca943ed2a9ede9025a71031d6a59aebb0e41860
parentdf3f5a8f1ef5f69a6413ca4add4e6f7b502174e6
[MSE][Mac] Null-deref in CMSampleBufferIsRandomAccess().
https://bugs.webkit.org/show_bug.cgi?id=125698

Reviewed by Sam Weinig.

If a given CMSampleBufferRef does not have a sample attachments array (which is unlikely, but
possible), CMSampleBufferGetAttachmentsArray() will return a null value.

Additionally, the CMSampleBuffer documentation states that "samples are assumed to be sync
samples by default", so the absence of an attachment array (or the absense of a
kCMSampleAttachmentKey_NotSync entry in any of the attachment dictionaries) indicates the
sample is sync.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::CMSampleBufferIsRandomAccess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm