mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Switching videos during active PiP left the window at the old video's size with white space around the new content, for two reasons: - MPV reports the new video's width and height as separate property events while the old values are kept across switches, so a transient mixed size (new width with old height) could reach the PiP capture path and AVKit sized the window from that frame. Coalesce the PiP capture-size/aspect update with a short debounce so only settled dimensions are used. - On macOS nothing told AVKit about the new aspect: unlike iOS, the bridge never flushed the sample buffer renderer on an aspect change during active PiP, and AVKit doesn't resize the macOS PiP window on its own. Flush the renderer, reset the format description, and resize the PiP window to the new aspect ratio explicitly.