]> git.sesse.net Git - vlc/commitdiff
- win32 vouts: fiex potential crash (SIGFPE) if the output window geometry is empty
authorDamien Fouilleul <damienf@videolan.org>
Tue, 22 May 2007 21:06:49 +0000 (21:06 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Tue, 22 May 2007 21:06:49 +0000 (21:06 +0000)
modules/video_output/msw/direct3d.c
modules/video_output/msw/events.c

index 8b5068155703a5dc5fa2f8274e65bd22262c5a6f..43740da5e06f05d242523a416f0431a416e53443 100644 (file)
@@ -334,7 +334,7 @@ static int Init( vout_thread_t *p_vout )
     E_(UpdateRects)( p_vout, VLC_TRUE );
 
     /*  create picture pool */
-    p_vout->fmt_out.i_chroma = 0;
+    p_vout->output.i_chroma = 0;
     i_ret = Direct3DVoutCreatePictures(p_vout, 1);
     if( VLC_SUCCESS != i_ret )
     {
index bbed9dbceb9ad8022cc26743771c3a5d6c65308c..3f676ac4e7ccc36a1207b54f73569ed2f893395b 100644 (file)
@@ -688,6 +688,13 @@ void E_(UpdateRects)( vout_thread_t *p_vout, vlc_bool_t b_force )
                      rect_dest_clipped.right, rect_dest_clipped.bottom );
 #endif
 
+#else /* MODULE_NAME_IS_vout_directx */
+
+    /* AFAIK, there are no clipping constraints in Direct3D, OpenGL and GDI */
+    rect_dest_clipped = rect_dest;
+
+#endif
+
     /* the 2 following lines are to fix a bug when clicking on the desktop */
     if( (rect_dest_clipped.right - rect_dest_clipped.left)==0 ||
         (rect_dest_clipped.bottom - rect_dest_clipped.top)==0 )
@@ -695,12 +702,6 @@ void E_(UpdateRects)( vout_thread_t *p_vout, vlc_bool_t b_force )
         SetRectEmpty( &rect_src_clipped );
         return;
     }
-#else /* MODULE_NAME_IS_vout_directx */
-
-    /* AFAIK, there are no clipping constraints in Direct3D, OpenGL and GDI */
-    rect_dest_clipped = rect_dest;
-
-#endif
 
     /* src image dimensions */
     rect_src.left = 0;