]> git.sesse.net Git - vlc/commitdiff
Qt: avoid crash in resume dialog
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 14 Dec 2014 21:48:33 +0000 (22:48 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 14 Dec 2014 21:48:33 +0000 (22:48 +0100)
I don't really see how this can happen, but it should fix it.

Close #13190

modules/gui/qt4/main_interface.cpp
modules/video_output/msw/directx.c

index 4c2f761f77263882de6ebb369bb6f569c7b1f68e..9fd996cd0d913913cdcfc374d083ac452a34030c 100644 (file)
@@ -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();
 }
 
index 0de33f2b07225b314d872fa100ef022de27b0c6a..8b8e3fb045010eb49fd77d59365d36736250213a 100644 (file)
@@ -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;