• Thomas Guillem's avatar
    RFC: vout: vd: handle initial place from Open(). · cf0ea956
    Thomas Guillem authored
    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.
    cf0ea956
Name
Last commit
Last update
autotools Loading commit data...
bin Loading commit data...
compat Loading commit data...
contrib Loading commit data...
doc Loading commit data...
extras Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
modules Loading commit data...
po Loading commit data...
share Loading commit data...
src Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
THANKS Loading commit data...
bootstrap Loading commit data...
configure.ac Loading commit data...
make-alias Loading commit data...