From 7916201401d118b3c83e99d86f30663dd68fc883 Mon Sep 17 00:00:00 2001 From: Marco Migliori Date: Fri, 9 Feb 2018 12:14:30 +0100 Subject: [PATCH] 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. --- video/out/vo_drm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/out/vo_drm.c b/video/out/vo_drm.c index 8262fce88d..e66058657b 100644 --- a/video/out/vo_drm.c +++ b/video/out/vo_drm.c @@ -443,6 +443,8 @@ static int preinit(struct vo *vo) goto err; } + vo->monitor_par = 1 / vo->opts->monitor_pixel_aspect; + return 0; err: