Commit e07983a6 authored by Laurent Aimar's avatar Laurent Aimar

Fixed no autoscale video mode (close #3246).

parent 97cbb479
...@@ -208,14 +208,10 @@ void vout_display_PlacePicture(vout_display_place_t *place, ...@@ -208,14 +208,10 @@ void vout_display_PlacePicture(vout_display_place_t *place,
return; return;
/* */ /* */
unsigned width;
unsigned height;
unsigned display_width; unsigned display_width;
unsigned display_height; unsigned display_height;
if (cfg->is_display_filled) { if (cfg->is_display_filled) {
width = source->i_visible_width;
height = source->i_visible_height;
display_width = cfg->display.width; display_width = cfg->display.width;
display_height = cfg->display.height; display_height = cfg->display.height;
} else { } else {
...@@ -223,17 +219,17 @@ void vout_display_PlacePicture(vout_display_place_t *place, ...@@ -223,17 +219,17 @@ void vout_display_PlacePicture(vout_display_place_t *place,
cfg_tmp.display.width = 0; cfg_tmp.display.width = 0;
cfg_tmp.display.height = 0; cfg_tmp.display.height = 0;
vout_display_GetDefaultDisplaySize(&width, &height, vout_display_GetDefaultDisplaySize(&display_width, &display_height,
source, &cfg_tmp); source, &cfg_tmp);
display_width = width;
display_height = height;
if (do_clipping) { if (do_clipping) {
display_width = __MIN(display_width, cfg->display.width); display_width = __MIN(display_width, cfg->display.width);
display_height = __MIN(display_height, cfg->display.height); display_height = __MIN(display_height, cfg->display.height);
} }
} }
const unsigned width = source->i_visible_width;
const unsigned height = source->i_visible_height;
/* Compute the height if we use the width to fill up display_width */ /* Compute the height if we use the width to fill up display_width */
const int64_t scaled_height = (int64_t)height * display_width * cfg->display.sar.num * source->i_sar_den / width / source->i_sar_num / cfg->display.sar.den; const int64_t scaled_height = (int64_t)height * display_width * cfg->display.sar.num * source->i_sar_den / width / source->i_sar_num / cfg->display.sar.den;
/* And the same but switching width/height */ /* And the same but switching width/height */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment