Changeset 264773 in webkit
- Timestamp:
- Jul 23, 2020, 10:22:02 AM (6 years ago)
- Location:
- branches/safari-610.1.23.1-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cocoa/SourceBufferParserWebM.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610.1.23.1-branch/Source/WebCore/ChangeLog
r264708 r264773 1 2020-07-23 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r264742. rdar://problem/65995985 4 5 [Cocoa|WebM] Decode error when seeking 6 https://bugs.webkit.org/show_bug.cgi?id=214666 7 8 Reviewed by Eric Carlson. 9 10 A decoder error is hit when seeking because we think all samples coming out of the SourceBufferParserWebM are sync-samples. 11 This is because the attachment added with CMSetAttachment() is ignored; the correct way to set sample attachments is by 12 getting the sample attachments array with CMSampleBufferGetSampleAttachmentsArray(), and then iterating over the attachments 13 and adding keys to the underlying mutable CFDictionary. 14 15 * platform/graphics/cocoa/SourceBufferParserWebM.cpp: 16 (WebCore::SourceBufferParserWebM::OnFrame): 17 18 19 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264742 268f45cc-cd09-0410-ab3c-d52691b4dbfc 20 21 2020-07-22 Jer Noble <jer.noble@apple.com> 22 23 [Cocoa|WebM] Decode error when seeking 24 https://bugs.webkit.org/show_bug.cgi?id=214666 25 26 Reviewed by Eric Carlson. 27 28 A decoder error is hit when seeking because we think all samples coming out of the SourceBufferParserWebM are sync-samples. 29 This is because the attachment added with CMSetAttachment() is ignored; the correct way to set sample attachments is by 30 getting the sample attachments array with CMSampleBufferGetSampleAttachmentsArray(), and then iterating over the attachments 31 and adding keys to the underlying mutable CFDictionary. 32 33 * platform/graphics/cocoa/SourceBufferParserWebM.cpp: 34 (WebCore::SourceBufferParserWebM::OnFrame): 35 1 36 2020-07-22 Alan Coon <alancoon@apple.com> 2 37 -
branches/safari-610.1.23.1-branch/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp
r264708 r264773 43 43 #include <wtf/Deque.h> 44 44 #include <wtf/NeverDestroyed.h> 45 #include <wtf/cf/TypeCastsCF.h> 45 46 #include <wtf/darwin/WeakLinking.h> 46 47 … … 794 795 trackData->currentBlockBufferPosition = 0; 795 796 796 if (!isSync) 797 CMSetAttachment(sampleBuffer.get(), kCMSampleAttachmentKey_NotSync, kCFBooleanTrue, kCMAttachmentMode_ShouldPropagate); 797 if (!isSync) { 798 auto attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(sampleBuffer.get(), true); 799 ASSERT(attachmentsArray); 800 if (!attachmentsArray) 801 return Skip(reader, bytesRemaining); 802 for (CFIndex i = 0, count = CFArrayGetCount(attachmentsArray); i < count; ++i) { 803 CFMutableDictionaryRef attachments = checked_cf_cast<CFMutableDictionaryRef>(CFArrayGetValueAtIndex(attachmentsArray, i)); 804 CFDictionarySetValue(attachments, kCMSampleAttachmentKey_NotSync, kCFBooleanTrue); 805 } 806 } 798 807 799 808 auto trackID = track.track_uid.value();
Note:
See TracChangeset
for help on using the changeset viewer.