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

Jean-Baptiste Kempf git at videolan.org
Sun Dec 14 22:49:01 CET 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Dec 14 22:48:33 2014 +0100| [e827a9404e415145dfc348a50632fe0b3338a01c] | 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

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

 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 4c2f761..9fd996c 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -433,7 +433,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 0de33f2..8b8e3fb 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