vlc | branch: master | Steve Lhomme <rob...@videolabs.io> | Mon Nov 21 14:09:01 
2016 +0100| [daf26e96cd7ad86bbb381a0e20d5b4c150f68a6e] | committer: Thomas 
Guillem

display: fill the whole video display in non-flat mode

Signed-off-by: Thomas Guillem <tho...@gllm.fr>

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

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

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 5747b49..b877db5 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -231,13 +231,20 @@ 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 {
+        /* No need to preserve an aspect ratio for 360 video.
+         * They can fill the display. */
         place->width  = display_width;
-        place->height = scaled_height;
+        place->height = display_height;
     }
 
     /*  Compute position */

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to