[vlc-devel] [PATCH 1/3] display: fill the whole video display in non-flat mode
Adrien Maglo
magsoft at videolan.org
Mon Nov 21 16:47:58 CET 2016
From: Steve Lhomme <robUx4 at videolabs.io>
---
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 */
--
2.9.3
More information about the vlc-devel
mailing list