[vlc-commits] video_output: allow 0/0 user aspect ratio

Steve Lhomme git at videolan.org
Tue Oct 13 13:15:31 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Oct 12 15:09:31 2020 +0200| [15dcef70d317f2b08819f6e56493bd0411d0fb53] | committer: Steve Lhomme

video_output: allow 0/0 user aspect ratio

We need to tell the core when the user wants to use the default (source) aspect
ratio, rather than one it sets before.

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

 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 6446fd916c..1c8159ce21 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;
 }
 



More information about the vlc-commits mailing list