-
Recent versions of libplacebo use `pl_frame.crop` instead of `pl_render_target.dst_rect`, for which the latter is now merely a fallback. Unfortunately, `pl_render_target_from_swapchain` ends up setting the former field to values based on the swapchain dimensions, so the values we set in `dst_rect` accidentally ended up ignored. In retrospect, this was caused by the upstream decision to make the new field override the old field if both are present, and having that logic the other way around would also have avoided this bug. Bite the bullet and make it conditional on the PL_API_VER. All that said - merely fixing this bug, however, exposed serious shortcomings in the video placement logic, in particular the lack of proper flipping support for OpenGL. Fix it by rewriting the video placement logic completely, based on the observation that `vout_display_PlacePicture` is a relatively cheap function to call. There's no need to awkwardly cache it inside `sys`.
fe6ec4ce