RFC: vout: vd: handle initial place from Open().
The following call from vout_display_New(): vout_display_GetDefaultDisplaySize(&osys->cfg.display.width, &osys->cfg.display.height, source, &osys->cfg) is overriding the vd cfg.display size. In that case, any future call of vout_display_PlacePicture() will be misplaced. Indeed, place->x = ((int)cfg->display.width - (int)place->width) / 2; place->y = ((int)cfg->display.height - (int)place->height) / 2; will be 0x0 since cfg->display.width == place->width. This is noticeable via the gl vd on Android with --no-autoscale: the display is not centered. After a VOUT_DISPLAY_CHANGE_* control, vout_display_PlacePicture() will use a correct cfg and the display will be well placed. The most obvious way to fix it is to remove the vout_display_GetDefaultDisplaySize() call from vout_display_New() and let all vd plugins handle their initial placement, like it's done in this commit. This commit is temporary and will be split if accepted. Other vd modules need to be fixed in that case.
Showing with 3 additions and 4 deletions