mirror of
https://github.com/yattee/yattee.git
synced 2026-07-19 22:02:10 +00:00
Fix low-FPS iOS PiP by reporting swaps while PiP is active
Since 1d9c5e3b performRender feeds swap timing to mpv via mpv_render_context_report_swap, but only after presentRenderbuffer - which is skipped while PiP is active. Once swap reports stop mid-stream, display-vdrop's vsync estimation goes stale and mpv drops nearly every frame (vo drop counter climbing ~19/s on a 24fps stream), turning PiP into a slideshow. The frame is genuinely displayed during PiP via the AVSampleBufferDisplayLayer, so report the swap on that path too.
This commit is contained in:
@@ -907,6 +907,12 @@ final class MPVRenderView: UIView {
|
||||
// macOS render views already do this.
|
||||
mpvClient.reportSwap()
|
||||
}
|
||||
} else {
|
||||
// PiP active: the frame is displayed via the PiP sample buffer layer instead
|
||||
// of presentRenderbuffer. Keep feeding swap timing to mpv — display-vdrop
|
||||
// relies on it once reports have started, and starving it makes mpv drop
|
||||
// nearly every frame (low-FPS PiP).
|
||||
mpvClient.reportSwap()
|
||||
}
|
||||
|
||||
// Warn on GPU stalls: a render+present that takes far longer than a frame
|
||||
|
||||
Reference in New Issue
Block a user