[vlc-commits] vout: get pixel A/R from persistent configuration

Rémi Denis-Courmont git at videolan.org
Sat Jan 26 19:51:11 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 24 21:42:10 2019 +0200| [5ef096d6bfd3f613cd19a39c040db032b6eb43d2] | committer: Rémi Denis-Courmont

vout: get pixel A/R from persistent configuration

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ef096d6bfd3f613cd19a39c040db032b6eb43d2
---

 src/video_output/video_output.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index c391f985c8..dc0f82c6a5 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -172,10 +172,8 @@ static void vout_display_window_GetSize(vlc_object_t *obj,
         h = x;
     }
 
-    unsigned par_num, par_den;
-    if (var_InheritURational(obj, &par_num, &par_den, "monitor-par") == 0
-     && par_num > 0 && par_den > 0)
-        w = (w * par_den) / par_num;
+    if (cfg->display.sar.num > 0 && cfg->display.sar.den > 0)
+        w = (w * cfg->display.sar.den) / cfg->display.sar.num;
 
     /* If width is forced, adjust height according to the aspect ratio */
     if (*width != 0) {



More information about the vlc-commits mailing list