Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5b18bd325557826aa45a867c3af1ac1971c6c250
      
https://github.com/WebKit/WebKit/commit/5b18bd325557826aa45a867c3af1ac1971c6c250
  Author: Youenn Fablet <[email protected]>
  Date:   2025-03-12 (Wed, 12 Mar 2025)

  Changed paths:
    M Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp
    M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

  Log Message:
  -----------
  AVVideoCaptureSource::capabilities() can crash if presets are empty
rdar://145993658
https://bugs.webkit.org/show_bug.cgi?id=289454

Reviewed by Eric Carlson.

We are getting reports of crashes in CapabilityRange constructorrrelease assert 
from AVVideoCaptureSource::capabilities().
This means that either the preset list is empty or that some presets have 
width/height/frame rate of 0.
We return early in such a case in 
RealtimeVideoCaptureSource::updateCapabilities to avoid the crash.
And we return an error from AVVideoCaptureSource::create.

* Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp:
(WebCore::RealtimeVideoCaptureSource::updateCapabilities):
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::create):

Canonical link: https://commits.webkit.org/292005@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to