Skip to content
  • Rémi Denis-Courmont's avatar
    vout: fix format for pre-enabled window · ccacd59d
    Rémi Denis-Courmont authored
    The window can be enabled even though the video output. In that case,
    EnableWindowLocked() tries to adjust the window size with the common
    vout_UpdateWindowSizeLocked() function. This relies on sys->original
    internally, unlike the case whereby the window is disabled.
    Consequently sys->original must already reflect the new format. This
    change moves the update of sys->original backward to meet the
    requirement.
    
    The flip side is of course that the format gets updated even if
    enabling the (disabled) window fails. Luckily this has no significance
    as there is no active display using either the old (stopped) or new
    (failed) formats.
    
    Note that the bug fixed here is hidden by another bug. In practice,
    the window size update is skipped entirely by the code from 3784e706
    as there is no display (and before 3784e706, this would be
    undefined behaviour).
    ccacd59d