[vlc-commits] display: ignore crop change failure

Rémi Denis-Courmont git at videolan.org
Sat Sep 2 19:22:51 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 10 18:16:42 2017 +0300| [f17c29ba7a2b300e42d8bc7fea0269e0f3c33870] | committer: Rémi Denis-Courmont

display: ignore crop change failure

This was never really allowed to fail anyway.

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

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

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 23b71e1c6d..ccc98af650 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -934,32 +934,16 @@ bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
                 bottom = (int)osys->source.i_y_offset + osys->crop.bottom;
             bottom = VLC_CLIP(bottom, top + 1, bottom_max);
 
-            unsigned int i_x_offset       = vd->source.i_x_offset;
-            unsigned int i_y_offset       = vd->source.i_y_offset;
-            unsigned int i_visible_width  = vd->source.i_visible_width;
-            unsigned int i_visible_height = vd->source.i_visible_height;
-
             vd->source.i_x_offset       = left;
             vd->source.i_y_offset       = top;
             vd->source.i_visible_width  = right - left;
             vd->source.i_visible_height = bottom - top;
             video_format_Print(VLC_OBJECT(vd), "SOURCE ", &osys->source);
             video_format_Print(VLC_OBJECT(vd), "CROPPED", &vd->source);
-            if (vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP)) {
-                msg_Err(vd, "Failed to change source crop TODO implement crop at core");
-
-                vd->source.i_x_offset       = i_x_offset;
-                vd->source.i_y_offset       = i_y_offset;
-                vd->source.i_visible_width  = i_visible_width;
-                vd->source.i_visible_height = i_visible_height;
-                crop_num = 0;
-                crop_den = 0;
-                /* FIXME implement cropping in the core if not supported by the
-                 * vout module (easy)
-                 */
-            } else if (!osys->fit_window) {
+            vout_display_Control(vd, VOUT_DISPLAY_CHANGE_SOURCE_CROP);
+
+            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;
             /* FIXME for right/bottom we should keep the 'type' border vs window */



More information about the vlc-commits mailing list