Fix H.264 codec on Arm64(M1) MacOS

Arm64 (M1) MacOS doesn't seem to like the kCVPixelBufferOpenGLCompatibilityKey
attribute. Remove this and the crash goes away.

Bug: webrtc:13934
Change-Id: Ic78db1ed852af6846f04b86462947ed7df17bb3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257921
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36457}
This commit is contained in:
Byoungchan Lee
2022-04-06 10:57:39 +09:00
committed by WebRTC LUCI CQ
parent 08591931c0
commit df894ad299
2 changed files with 2 additions and 2 deletions

View File

@ -207,7 +207,7 @@ void decompressionOutputCallback(void *decoderRef,
(NSString *)kCVPixelBufferMetalCompatibilityKey : @(YES),
#elif defined(WEBRTC_IOS)
(NSString *)kCVPixelBufferOpenGLESCompatibilityKey : @(YES),
#elif defined(WEBRTC_MAC)
#elif defined(WEBRTC_MAC) && !defined(WEBRTC_ARCH_ARM64)
(NSString *)kCVPixelBufferOpenGLCompatibilityKey : @(YES),
#endif
#if !(TARGET_OS_SIMULATOR)

View File

@ -610,7 +610,7 @@ NSUInteger GetMaxSampleRate(const webrtc::H264ProfileLevelId &profile_level_id)
(NSString *)kCVPixelBufferMetalCompatibilityKey : @(YES),
#elif defined(WEBRTC_IOS)
(NSString *)kCVPixelBufferOpenGLESCompatibilityKey : @(YES),
#elif defined(WEBRTC_MAC)
#elif defined(WEBRTC_MAC) && !defined(WEBRTC_ARCH_ARM64)
(NSString *)kCVPixelBufferOpenGLCompatibilityKey : @(YES),
#endif
(NSString *)kCVPixelBufferIOSurfacePropertiesKey : @{},