You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[camera_avfoundation] Fix crash when streaming while recording (#9691)
In `captureOutput`, we receive both pixel and audio buffers (audio only during recording with audio enabled, when streaming alone is enabled, everything works correctly). Currently, the streaming part of this method doesn't handle non-pixel buffers properly, causing a crash because of force unwrapping of nil.
This PR changes the logic to ignore non-pixel buffers for purposes of streaming.
Resolvesflutter/flutter#172894.
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Copy file name to clipboardExpand all lines: packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation/DefaultCamera.swift
+76-67Lines changed: 76 additions & 67 deletions
Original file line number
Diff line number
Diff line change
@@ -758,73 +758,7 @@ final class DefaultCamera: FLTCam, Camera {
0 commit comments