Commit 8dde36b
committed
[video_player] Avoid returning no frame on macOS
While the display-link-driven frame updater will only inform the engine
that a frame is available when the underlying player has a frame for the
current time, there's no guarantee that the player will have a frame for
the time that is current when the engine actually requests the frame.
To avoid flickering from returning no frame, if a frame isn't available
for the current time when it is requested, provide the frame that was
known to be available when the request was triggered in the first place.
Fixes flutter/flutter#1359991 parent 5badf97 commit 8dde36b
File tree
2 files changed
+13
-1
lines changed- packages/video_player/video_player_avfoundation
- darwin/Classes
- example/macos/Runner.xcodeproj
2 files changed
+13
-1
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
| 98 | + | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| |||
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
| 306 | + | |
301 | 307 | | |
302 | 308 | | |
303 | 309 | | |
| |||
562 | 568 | | |
563 | 569 | | |
564 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
565 | 577 | | |
566 | 578 | | |
567 | 579 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
0 commit comments