Repository navigation
Commit e18a541
authored
[video_player] Ignore late position updates after disposal (flutter#12971)
A platform seek can finish after `VideoPlayerController.dispose()`, causing `_updatePosition` to write to the disposed notifier and throw. This also happens in the controller's own `VideoEventType.completed` pause/seek chain, without the caller invoking a method after disposal.
Checks `_isDisposed` at the shared position-update boundary. Adds regressions for an explicit pending seek and the pending seek from a playback-completed event. Both tests fail on the unmodified controller and pass with the guard. The patch updates the package to 2.14.1 and incorporates the existing `NEXT` changelog entry as required by the release instructions.
Fixes flutter#193147
Validation with Flutter 3.44.9 / Dart 3.12.2:
- Full Dart package suite: 118 passed, one existing skipped test.
- `dart analyze --fatal-infos` for the package and example: no issues.
- Repository Dart formatter run; unrelated pre-existing caption-test reformatting excluded from the diff.
- Repository `publish-check`: passed after committing the four-file patch.
- `git diff --check`: passed.
Repository-wide `validate` could not complete in the sparse checkout because the root README references packages outside the checkout (`animations`). Native/integration tests were not run; this change is limited to the Dart controller.
No public API or dartdoc changes are needed.
## Pre-Review Checklist1 parent 7368361 commit e18a541
4 files changed
Lines changed: 49 additions & 2 deletions
File tree
- packages/video_player/video_player
- lib
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
981 | 985 | | |
982 | 986 | | |
983 | 987 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
675 | 693 | | |
676 | 694 | | |
677 | 695 | | |
| |||
1456 | 1474 | | |
1457 | 1475 | | |
1458 | 1476 | | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
1459 | 1499 | | |
1460 | 1500 | | |
1461 | 1501 | | |
| |||
2021 | 2061 | | |
2022 | 2062 | | |
2023 | 2063 | | |
| 2064 | + | |
2024 | 2065 | | |
2025 | 2066 | | |
2026 | 2067 | | |
| |||
2108 | 2149 | | |
2109 | 2150 | | |
2110 | 2151 | | |
| 2152 | + | |
2111 | 2153 | | |
2112 | 2154 | | |
2113 | 2155 | | |
| |||
0 commit comments