[vlc-commits] display: simplify some additions/substractions

Steve Lhomme git at videolan.org
Sat Feb 17 10:13:02 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sat Feb 17 10:09:29 2018 +0100| [cbdc91162a7aae5e75c1af1ca0db78a8d5ebfbc2] | committer: Steve Lhomme

display: simplify some additions/substractions

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

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

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 1160354522..909cb67001 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -923,12 +923,12 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
 
             if (!osys->fit_window)
                 osys->fit_window = 1;
-            osys->crop.left   = vd->source.i_x_offset - osys->source.i_x_offset;
-            osys->crop.top    = vd->source.i_y_offset - osys->source.i_y_offset;
+            osys->crop.left   = left - osys->source.i_x_offset;
+            osys->crop.top    = top  - osys->source.i_y_offset;
             /* FIXME for right/bottom we should keep the 'type' border vs window */
-            osys->crop.right  = (vd->source.i_x_offset + vd->source.i_visible_width) -
+            osys->crop.right  = right -
                                 (osys->source.i_x_offset + osys->source.i_visible_width);
-            osys->crop.bottom = (vd->source.i_y_offset + vd->source.i_visible_height) -
+            osys->crop.bottom = bottom -
                                 (osys->source.i_y_offset + osys->source.i_visible_height);
             osys->crop.num    = crop_num;
             osys->crop.den    = crop_den;



More information about the vlc-commits mailing list