Repository: flutter
Issue: [camera] iOS Camera freezes when switching between pause and resume more than 15 times while recording a video
Labels: platform-ios,p: camera,package,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-ios,triaged-ios

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Clone the example code from `https://github.com/flutter/packages`
2. Run camera example code
3. Tap to open camera
4. Switch pause and resume more than 15 times

**Expected results:** Everything should work normally

**Actual results:** Camera Preview is freeze


<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue. If there is a crash, please include
      the entirety of the crash log including the backtrace.
-->

```
No exception or log print out
```
```
Camera version: Latest code from github
```

```
[✓] Flutter (Channel stable, 3.7.6, on macOS 12.5 21G72 darwin-arm64, locale en-VN)
    • Flutter version 3.7.6 on channel stable at /Users/vinhnong/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 12cb4eb7a0 (8 days ago), 2023-03-01 10:29:26 -0800
    • Engine revision ada363ee93
    • Dart version 2.19.3
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc5)
    • Android SDK at /Users/vinhnong/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0-rc5
    • Java binary at: /Library/Java/JavaVirtualMachines/jdk-11.0.11.jdk/Contents/Home/bin/java
    • Java version Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.76.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • Vinh’s iPhone (mobile) • 00008110-00121C4A1A04801E • ios            • iOS 16.1.1 20B101
    • macOS (desktop)        • macos                     • darwin-arm64   • macOS 12.5 21G72 darwin-arm64
    • Chrome (web)           • chrome                    • web-javascript • Google Chrome 110.0.5481.177

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```