[vlc-devel] [PATCH 07/10] vout: remove no-op assignments

remi at remlab.net remi at remlab.net
Sat Feb 6 16:27:29 UTC 2021


From: RĂ©mi Denis-Courmont <remi at remlab.net>

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

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 3dd0faa574..06fb16ffc1 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -457,8 +457,8 @@ static int vout_UpdateSourceCrop(vout_display_t *vd)
 {
     vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
     video_format_t fmt = osys->source;
-    unsigned crop_num = osys->crop.num;
-    unsigned crop_den = osys->crop.den;
+    const unsigned crop_num = osys->crop.num;
+    const unsigned crop_den = osys->crop.den;
 
     if (crop_num != 0 && crop_den != 0) {
         VoutDisplayCropRatio(&osys->crop.left,  &osys->crop.top,
@@ -503,8 +503,6 @@ static int vout_UpdateSourceCrop(vout_display_t *vd)
                         (osys->source.i_x_offset + osys->source.i_visible_width);
     osys->crop.bottom = bottom -
                         (osys->source.i_y_offset + osys->source.i_visible_height);
-    osys->crop.num    = crop_num;
-    osys->crop.den    = crop_den;
     return ret;
 }
 
-- 
2.30.0



More information about the vlc-devel mailing list