if (load_module) {
vd->module = module_need(vd, "vout display", module, module && *module != '\0');
if (!vd->module) {
- vlc_object_detach(vd);
vlc_object_release(vd);
return NULL;
}
*/
static void vout_display_Delete(vout_display_t *vd)
{
- vlc_object_detach(vd);
-
if (vd->module)
module_unneed(vd, vd->module);
return;
/* */
- unsigned width;
- unsigned height;
unsigned display_width;
unsigned display_height;
if (cfg->is_display_filled) {
- width = source->i_visible_width;
- height = source->i_visible_height;
display_width = cfg->display.width;
display_height = cfg->display.height;
} else {
cfg_tmp.display.width = 0;
cfg_tmp.display.height = 0;
- vout_display_GetDefaultDisplaySize(&width, &height,
+ vout_display_GetDefaultDisplaySize(&display_width, &display_height,
source, &cfg_tmp);
- display_width = width;
- display_height = height;
if (do_clipping) {
display_width = __MIN(display_width, cfg->display.width);
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 */
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 */
if (!convert)
return;
- msg_Err(vd, "A filter to adapt decoder to display is needed");
+ msg_Dbg(vd, "A filter to adapt decoder to display is needed");
osys->filters = filter_chain_New(vd, "video filter2", false,
FilterAllocationInit,
{
vout_display_owner_sys_t *osys = vd->owner.sys;
- if (osys->zoom.num != num || osys->zoom.den != den) {
+ if (osys->is_display_filled ||
+ osys->zoom.num != num || osys->zoom.den != den) {
osys->ch_zoom = true;
osys->zoom.num = num;
osys->zoom.den = den;