[vlc-devel] [PATCH 1/2] video_output: allow 0/0 user aspect ratio

Steve Lhomme robux4 at ycbcr.xyz
Mon Oct 12 15:14:04 CEST 2020


We need to tell the core when the user wants to use the default (source) aspect
ratio, rather than one it sets before.
---
 src/video_output/vout_intf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 6446fd916cf..1c8159ce21e 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -528,8 +528,10 @@ bool GetAspectRatio(const char *ar_str, unsigned *num, unsigned *den)
     if (sscanf(ar_str, "%u:%u", num, den) == 2 &&
         (num != 0) == (den != 0))
         return true;
-    else if (*ar_str == '\0')
+    else if (*ar_str == '\0') {
         *num = *den = 0;
+        return true;
+    }
     return false;
 }
 
-- 
2.26.2



More information about the vlc-devel mailing list