mirror of https://code.videolan.org/videolan/vlc
libplacebo: do the vertical flipping locally in flipped output
Rather than position to bottom side, we position the top one.
This commit is contained in:
parent
c35a90d4ec
commit
c69fb3d959
|
@ -297,23 +297,12 @@ 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;
|
||||
struct vout_display_placement dp = vd->cfg->display;
|
||||
if (!need_vflip)
|
||||
vout_display_PlacePicture(&place, vd->fmt, &vd->cfg->display);
|
||||
else
|
||||
{
|
||||
switch (dp.align.vertical) {
|
||||
case VLC_VIDEO_ALIGN_TOP:
|
||||
dp.align.vertical = VLC_VIDEO_ALIGN_BOTTOM;
|
||||
break;
|
||||
case VLC_VIDEO_ALIGN_BOTTOM:
|
||||
dp.align.vertical = VLC_VIDEO_ALIGN_TOP;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
vout_display_PlacePicture(&place, vd->fmt, &dp);
|
||||
place.y = vd->cfg->display.height - place.y;
|
||||
vout_display_PlacePicture(&place, vd->fmt, &vd->cfg->display);
|
||||
place.y = place.height + place.y;
|
||||
place.height = -place.height;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue