[vlc-devel] [PATCH 3/4] vout: display: re-indent

Thomas Guillem thomas at gllm.fr
Tue Dec 10 14:50:55 CET 2019


No functional changes.
---
 src/video_output/display.c | 46 +++++++++++++++++++++-----------------
 1 file changed, 26 insertions(+), 20 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 1f0c172abb3..bc431c62eea 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -94,27 +94,33 @@ void vout_display_GetDefaultDisplaySize(unsigned *width, unsigned *height,
     if (cfg->is_display_filled
      && (cfg->display.width != 0 || cfg->display.height != 0))
     {
-    if (cfg->display.width != 0 && cfg->display.height != 0) {
-        *width  = cfg->display.width;
-        *height = cfg->display.height;
-    } else if (cfg->display.width != 0) {
-        *width  = cfg->display.width;
-        *height = (int64_t)source->i_visible_height * source->i_sar_den * cfg->display.width * cfg->display.sar.num /
-            source->i_visible_width / source->i_sar_num / cfg->display.sar.den;
-    } else {
-        assert(cfg->display.height != 0);
-        *width  = (int64_t)source->i_visible_width * source->i_sar_num * cfg->display.height * cfg->display.sar.den /
-            source->i_visible_height / source->i_sar_den / cfg->display.sar.num;
-        *height = cfg->display.height;
-    }
-    } else {
-    if (source->i_sar_num >= source->i_sar_den) {
-        *width  = (int64_t)source->i_visible_width * source->i_sar_num * cfg->display.sar.den / source->i_sar_den / cfg->display.sar.num;
-        *height = source->i_visible_height;
+        if (cfg->display.width != 0 && cfg->display.height != 0) {
+            *width  = cfg->display.width;
+            *height = cfg->display.height;
+        } else if (cfg->display.width != 0) {
+            *width  = cfg->display.width;
+            *height = (int64_t)source->i_visible_height * source->i_sar_den
+                    * cfg->display.width * cfg->display.sar.num
+                    / source->i_visible_width / source->i_sar_num
+                    / cfg->display.sar.den;
+        } else {
+            assert(cfg->display.height != 0);
+            *width  = (int64_t)source->i_visible_width * source->i_sar_num
+                    * cfg->display.height * cfg->display.sar.den
+                    / source->i_visible_height / source->i_sar_den
+                    / cfg->display.sar.num;
+            *height = cfg->display.height;
+        }
     } else {
-        *width  = source->i_visible_width;
-        *height = (int64_t)source->i_visible_height * source->i_sar_den * cfg->display.sar.num / source->i_sar_num / cfg->display.sar.den;
-    }
+        if (source->i_sar_num >= source->i_sar_den) {
+            *width  = (int64_t)source->i_visible_width * source->i_sar_num
+                    * cfg->display.sar.den / source->i_sar_den / cfg->display.sar.num;
+            *height = source->i_visible_height;
+        } else {
+            *width  = source->i_visible_width;
+            *height = (int64_t)source->i_visible_height * source->i_sar_den
+                    * cfg->display.sar.num / source->i_sar_num / cfg->display.sar.den;
+        }
     }
 
     *width  = *width  * cfg->zoom.num / cfg->zoom.den;
-- 
2.20.1



More information about the vlc-devel mailing list