libplacebo: factorize a vout_display_PlacePicture() call

This commit is contained in:
Steve Lhomme 2024-04-09 15:02:05 +02:00
parent c69fb3d959
commit f2e5a46bf6
1 changed files with 2 additions and 4 deletions

View File

@ -297,11 +297,9 @@ static void PictureRender(vout_display_t *vd, picture_t *pic,
// Set the target crop dynamically based on the swapchain flip state
vout_display_place_t place;
if (!need_vflip)
vout_display_PlacePicture(&place, vd->fmt, &vd->cfg->display);
else
vout_display_PlacePicture(&place, vd->fmt, &vd->cfg->display);
if (need_vflip)
{
vout_display_PlacePicture(&place, vd->fmt, &vd->cfg->display);
place.y = place.height + place.y;
place.height = -place.height;
}