Repository: flutter
Issue: [camera] Videos are invalid after switched camera when recording
Labels: e: device-specific,platform-android,p: camera,package,has reproducible steps,P2,found in release: 3.10,team-android,triaged-android,found in release: 3.13

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Run the `camera`'s example on Android devices (OnePlus 6T A6010 in my test).
2. Switch a camera instance and start recording.
3. Flip to another camera without stopping the recording.
4. Stop the recording after the camera was flipped.
5. Preview the recording using `video_player`.

#### Reproducible devices (thanks to our cn community)

| Model           | Sys ver.   |
|-----------------|------------|
| OnePlus 11      | Android 13 |
| OnePlus Ace Pro | Android 13 |
| OnePlus 9 Pro   | Android 13 |
| OnePlus 6T      | Android 11 |
| OnePlus 3       | Android 8  |
| Meizu 16T       | Android 10 |
| iQOO Z6         | Android 12 |
| Vivo Y9S        | Android 9  |
| Redmi K50       | Android 13 |
| Redmi K40 Pro   | Android 11 |
| Redmi K30       | Android 11 |
| Redmi Note 9    | Android 12 |
| Xiaomi 10T Pro  | Android 11 |
| OPPO Pad        | Android 10 |
| OPPO Find N     | Android 13 |

#### Not reproducible devices

| Model         | Sys ver.   |
|---------------|------------|
| Redmi Note 5  | Android 9  |
| Huawei Mate 9 | Android 11 |

### Expected results

Videos produced in this way should behave normally with flipped camera content.

### Actual results

After the camera is flipped, the content was stopped at the time the camera was flipped.

### Code sample

https://github.com/flutter/packages/blob/07e09301698f88894f3ffc5f1578422db0a2a987/packages/camera/camera/example/lib/main.dart

### Screenshots or Video

| Screen recording                                                                                      | Recorded video                                                                                        |
|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
 | <video src="https://user-images.githubusercontent.com/15884415/236682219-dc673643-b210-46e5-b477-9f744f1e3d51.mp4" /> | <video src="https://user-images.githubusercontent.com/15884415/236682253-67530cc2-203b-4a4f-9b41-1473fe95513a.mp4" /> |

### Logs

[logs.txt](https://github.com/flutter/flutter/files/11415158/logs.txt)


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.7.12, on Microsoft Windows [Version 10.0.22621.1555], locale en-US)
    • Flutter version 3.7.12 on channel stable at X:\SDK\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (3 weeks ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at X:\Android\SDK
    • Platform android-33-ext5, build-tools 33.0.2
    • ANDROID_HOME = X:\Android\SDK
    • ANDROID_SDK_ROOT = X:\Android\SDK
    • Java binary at: X:\IDEs\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
    • All Android licenses accepted.

[√] IntelliJ IDEA Ultimate Edition (version 2023.1)
    • IntelliJ at X:\IDEs\apps\IDEA-U\ch-0\231.8109.175
    • Flutter plugin version 73.0.4
    • Dart plugin version 231.8109.91

[√] Connected device (4 available)
    • ONEPLUS A6010 (mobile) • f8e67ce3 • android-arm64  • Android 11 (API 30)

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>