[vlc-commits] Qt: avoid crash in resume dialog

Jean-Baptiste Kempf git at videolan.org
Wed Dec 17 17:54:52 CET 2014


vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Dec 14 22:48:33 2014 +0100| [929c88bd9e6c28749c2dbffead07bd17a8adc501] | committer: Jean-Baptiste Kempf

Qt: avoid crash in resume dialog

I don't really see how this can happen, but it should fix it.

Close #13190

(cherry picked from commit e827a9404e415145dfc348a50632fe0b3338a01c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=929c88bd9e6c28749c2dbffead07bd17a8adc501
---

 modules/gui/qt4/main_interface.cpp |    4 +++-
 modules/video_output/msw/directx.c |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 7e951b2..8c911e8 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -435,7 +435,9 @@ void MainInterface::hideResumePanel()
 
 void MainInterface::resumePlayback()
 {
-    var_SetTime( THEMIM->getInput(), "time", i_resumeTime );
+    if( THEMIM->getIM()->hasInput() ) {
+        var_SetTime( THEMIM->getInput(), "time", i_resumeTime );
+    }
     hideResumePanel();
 }
 
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index afaa8f8..6ce1eab 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -851,8 +851,8 @@ static int DirectXCreateSurface(vout_display_t *vd,
     ddsd.dwSize   = sizeof(ddsd);
     ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat);
     ddsd.dwFlags  = DDSD_HEIGHT | DDSD_WIDTH;
-    ddsd.dwWidth  = fmt->i_visible_width;
-    ddsd.dwHeight = fmt->i_visible_height;
+    ddsd.dwWidth  = fmt->i_width;
+    ddsd.dwHeight = fmt->i_height;
     if (fourcc) {
         ddsd.dwFlags |= DDSD_PIXELFORMAT;
         ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC;



More information about the vlc-commits mailing list