Changeset 243404 in webkit
- Timestamp:
- Mar 22, 2019, 3:54:50 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r243402 r243404 1 2019-03-22 Eric Carlson <eric.carlson@apple.com> 2 3 Flaky AVEncoderBitRateKey symbol not found crash on imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html 4 https://bugs.webkit.org/show_bug.cgi?id=193724 5 <rdar://problem/47483831> 6 7 Reviewed by Jer Noble. 8 9 The soft link macros occasionally fail to load constants from AVFoundation.framework 10 which are actually in one of its sub-frameworks. While we investigate the cause 11 cause of the failure, ise the SOFT_LINK_CONSTANT_MAY_FAIL so we can detect the failure 12 and return a local copy of the string instead of crashing. 13 14 No new tests, this should prevent existing tests from crashing. 15 16 * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: 17 (WebCore::myAVFormatIDKey): 18 (WebCore::myAVNumberOfChannelsKey): 19 (WebCore::myAVSampleRateKey): 20 (WebCore::myAVEncoderBitRateKey): 21 1 22 2019-03-22 Youenn Fablet <youenn@apple.com> 2 23 -
trunk/Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm
r240437 r243404 53 53 SOFT_LINK_CONSTANT(AVFoundation, AVMediaTypeVideo, NSString *) 54 54 SOFT_LINK_CONSTANT(AVFoundation, AVMediaTypeAudio, NSString *) 55 SOFT_LINK_CONSTANT(AVFoundation, AVEncoderBitRateKey, NSString *)56 SOFT_LINK_CONSTANT(AVFoundation, AVFormatIDKey, NSString *)57 SOFT_LINK_CONSTANT(AVFoundation, AVNumberOfChannelsKey, NSString *)58 SOFT_LINK_CONSTANT(AVFoundation, AVSampleRateKey, NSString *)59 55 60 56 SOFT_LINK_CONSTANT(AVFoundation, AVVideoExpectedSourceFrameRateKey, NSString *) … … 72 68 #define AVVideoWidthKey getAVVideoWidthKey() 73 69 #define AVVideoHeightKey getAVVideoHeightKey() 74 #define AVEncoderBitRateKey getAVEncoderBitRateKey()75 #define AVFormatIDKey getAVFormatIDKey()76 #define AVNumberOfChannelsKey getAVNumberOfChannelsKey()77 #define AVSampleRateKey getAVSampleRateKey()78 70 79 71 #define AVVideoExpectedSourceFrameRateKey getAVVideoExpectedSourceFrameRateKey() … … 84 76 #define AVVideoCompressionPropertiesKey getAVVideoCompressionPropertiesKey() 85 77 78 SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVEncoderBitRateKey, NSString *) 79 SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVFormatIDKey, NSString *) 80 SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVNumberOfChannelsKey, NSString *) 81 SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVSampleRateKey, NSString *) 82 83 #define AVEncoderBitRateKey getAVEncoderBitRateKeyWithFallback() 84 #define AVFormatIDKey getAVFormatIDKeyWithFallback() 85 #define AVNumberOfChannelsKey getAVNumberOfChannelsKeyWithFallback() 86 #define AVSampleRateKey getAVSampleRateKeyWithFallback() 87 86 88 namespace WebCore { 87 89 88 90 using namespace PAL; 91 92 static NSString *getAVFormatIDKeyWithFallback() 93 { 94 if (canLoadAVFormatIDKey()) 95 return getAVFormatIDKey(); 96 97 RELEASE_LOG_ERROR(Media, "Failed to load AVFormatIDKey"); 98 return @"AVFormatIDKey"; 99 } 100 101 static NSString *getAVNumberOfChannelsKeyWithFallback() 102 { 103 if (canLoadAVNumberOfChannelsKey()) 104 return getAVNumberOfChannelsKey(); 105 106 RELEASE_LOG_ERROR(Media, "Failed to load AVNumberOfChannelsKey"); 107 return @"AVNumberOfChannelsKey"; 108 } 109 110 static NSString *getAVSampleRateKeyWithFallback() 111 { 112 if (canLoadAVSampleRateKey()) 113 return getAVSampleRateKey(); 114 115 RELEASE_LOG_ERROR(Media, "Failed to load AVSampleRateKey"); 116 return @"AVSampleRateKey"; 117 } 118 119 static NSString *getAVEncoderBitRateKeyWithFallback() 120 { 121 if (canLoadAVEncoderBitRateKey()) 122 return getAVEncoderBitRateKey(); 123 124 RELEASE_LOG_ERROR(Media, "Failed to load AVEncoderBitRateKey"); 125 return @"AVEncoderBitRateKey"; 126 } 89 127 90 128 RefPtr<MediaRecorderPrivateWriter> MediaRecorderPrivateWriter::create(const MediaStreamTrackPrivate* audioTrack, const MediaStreamTrackPrivate* videoTrack)
Note:
See TracChangeset
for help on using the changeset viewer.