[vlc-devel] [PATCH 1/7] display: only call CHANGE_SOURCE_ASPECT if the value changed on osys->source

Steve Lhomme robux4 at ycbcr.xyz
Fri Nov 13 16:56:28 CET 2020


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

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 1d304e2b32b..0ddfc3bd452 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -530,10 +530,10 @@ static int vout_SetSourceAspect(vout_display_t *vd,
     if (sar_num > 0 && sar_den > 0) {
         osys->source.i_sar_num = sar_num;
         osys->source.i_sar_den = sar_den;
-    }
 
-    if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))
-        ret = -1;
+        if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT))
+            ret = -1;
+    }
 
     /* If a crop ratio is requested, recompute the parameters */
     if (osys->crop.num != 0 && osys->crop.den != 0
-- 
2.26.2



More information about the vlc-devel mailing list