[vlc-devel] [PATCH] display: fill the whole video display in non-flat mode

Steve Lhomme robux4 at videolabs.io
Wed Nov 16 18:01:44 CET 2016


---
 src/video_output/display.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index b3fce3c..73ca509 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -231,13 +231,18 @@ void vout_display_PlacePicture(vout_display_place_t *place,
     /* And the same but switching width/height */
     const int64_t scaled_width  = (int64_t)width  * display_height * cfg->display.sar.den * source->i_sar_num / height / source->i_sar_den / cfg->display.sar.num;
 
-    /* We keep the solution that avoid filling outside the display */
-    if (scaled_width <= cfg->display.width) {
-        place->width  = scaled_width;
-        place->height = display_height;
+    if (source->projection_mode == PROJECTION_MODE_RECTANGULAR) {
+        /* We keep the solution that avoid filling outside the display */
+        if (scaled_width <= cfg->display.width) {
+            place->width  = scaled_width;
+            place->height = display_height;
+        } else {
+            place->width  = display_width;
+            place->height = scaled_height;
+        }
     } else {
         place->width  = display_width;
-        place->height = scaled_height;
+        place->height = display_height;
     }
 
     /*  Compute position */
-- 
2.10.1



More information about the vlc-devel mailing list