[vlc-commits] vout: get zoom from persistent configuration

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


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

vout: get zoom from persistent configuration

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index dc0f82c6a5..da9e82bd73 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -188,20 +188,8 @@ static void vout_display_window_GetSize(vlc_object_t *obj,
     }
 
     /* If neither width nor height are forced, use the requested zoom. */
-    float zoom = var_InheritFloat(obj, "zoom");
-
-    if (isnan(zoom))
-        zoom = 1.f;
-    else
-        zoom = fabsf(zoom);
-
-    if (zoom < 0.1f)
-        zoom = 0.1f;
-    if (zoom > 10.f)
-        zoom = 10.f;
-
-    *width = lroundf(zoom * (float)w);
-    *height = lroundf(zoom * (float)h);
+    *width = (w * cfg->zoom.num) / cfg->zoom.den;
+    *height = (h * cfg->zoom.num) / cfg->zoom.den;
 }
 
 static vout_thread_t *VoutCreate(vlc_object_t *object,



More information about the vlc-commits mailing list