Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3ce65ddbeb46976f0e7e8f7fa8d312292f0a7d0d
https://github.com/WebKit/WebKit/commit/3ce65ddbeb46976f0e7e8f7fa8d312292f0a7d0d
Author: Jer Noble <[email protected]>
Date: 2025-10-24 (Fri, 24 Oct 2025)
Changed paths:
M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h
M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
Log Message:
-----------
Crash in AVVideoCaptureSource::takePhotoInternal(...): uncaught exception
from -[AVCapturePhotoOutput setMaxPhotoDimensions:]
rdar://146009436
https://bugs.webkit.org/show_bug.cgi?id=300258
Reviewed by Eric Carlson.
-setMaxPhotoDimensions: will throw if the dimensions being set aren't included
in the
set of dimensions returned from the device's activeFormat's
-supportedMaxPhotoDimensions.
We read these dimensions directly from AVCaptureDeviceFormat, but then dispatch
to a work
queue in order to call -setMaxPhotoDimensions, and it's possible that the
device is reconfigured
between retrieving these dimensions from the activeFormat and setting them on
the output.
Pass the AVCaptureDevice into the work queue, and re-validate the requested
dimensions
against the device's active format before setting the maxPhotoDimensions.
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::toIntSize):
(WebCore::toCMVideoDimensions):
(WebCore::AVVideoCaptureSource::maxPhotoSizeForCurrentPreset const):
(WebCore::AVVideoCaptureSource::maxPhotoSizeForActiveFormat const):
(WebCore::AVVideoCaptureSource::takePhotoInternal):
Canonical link: https://commits.webkit.org/302115@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications