vo_drm: support --monitorpixelaspect

This commit allows for video to be shown with the right aspect even when
pixels are not square in the selected drm mode. For example, if drm mode
5 is "640x400", the right aspect on a 4:3 monitor is obtained by mpv
--vo=drm --drm-mode=5 --monitorpixelaspect=5:6 ...

Other vo's seem to make this parameter change the size of the window,
but in the drm vo this is fixed, being as large as the screen.
This commit is contained in:
Marco Migliori 2018-02-09 12:14:30 +01:00 committed by Kevin Mitchell
parent 733bcc03f6
commit 7916201401
1 changed files with 2 additions and 0 deletions

View File

@ -443,6 +443,8 @@ static int preinit(struct vo *vo)
goto err;
}
vo->monitor_par = 1 / vo->opts->monitor_pixel_aspect;
return 0;
err: