[vlc-devel] [PATCH 0/1] Fix bug in qt4 video window sizing

Darrell Walisser darrell.walisser at gmail.com
Fri Feb 26 01:34:20 CET 2016

This patch fixes a but in the qt4 interface, where the video is not scaled
to fit inside the window, in the case when the autoresize gui ("Always Fit Window")
option is disabled. To reproduce the bug, open VLC, then open a video. The video will
not be scaled to fit within the ui.

I traced the bug to the following sequence:
1. vout sends a VOUT_WINDOW_SET_SIZE event initially with the native size of the video
2. if autoresize gui disabled, this event is ignored since askVideoToResize() is not connected to any slot
3. vout_window_ReportSize() is never called, so vout assumes the display size is the native size

Once that signal is connected, the next fix is to ensure MainInterface::setVideoSize() always calls 
VideoWidget::setSize() so that vout_window_ReportSize will be called and the vout can scale&center correctly.

Darrell Walisser (1):
  fix incorrect size of video on open when gui autoresizing is disabled

 modules/gui/qt4/components/interface_widgets.cpp | 10 ++++++++++
 modules/gui/qt4/main_interface.cpp               | 19 +++++++++++++++----
 2 files changed, 25 insertions(+), 4 deletions(-)


More information about the vlc-devel mailing list