[Mplayer-cvslog] CVS: main/libvo vo_dga.c,1.24,1.25

Andreas Ackermann acki2 at users.sourceforge.net
Mon Jun 18 00:21:49 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv22058/libvo

Modified Files:
	vo_dga.c 
Log Message:
- if DGA fails to report some valid modes, vo_dga now exits gracefully 
  instead of crashing ... (100000x100000 bug ...) 


Index: vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** vo_dga.c	2001/06/17 20:59:39	1.24
--- vo_dga.c	2001/06/17 22:21:47	1.25
***************
*** 24,27 ****
--- 24,31 ----
   *
   * $Log$
+  * Revision 1.25  2001/06/17 22:21:47  acki2
+  * - if DGA fails to report some valid modes, vo_dga now exits gracefully
+  *   instead of crashing ... (100000x100000 bug ...)
+  *
   * Revision 1.24  2001/06/17 20:59:39  acki2
   * - doublebuffering now can be switched on and off with the -(no)double switch.
***************
*** 156,159 ****
--- 160,165 ----
  //#define BYTESPP (vo_dga_modes[vo_dga_active_mode].vdm_bytespp)
  
+ #define VO_DGA_INVALID_RES 100000
+ 
  #define HW_MODE (vo_dga_modes[vo_dga_hw_mode])
  #define SRC_MODE (vo_dga_modes[vo_dga_src_mode]) 
***************
*** 767,771 ****
  #ifdef HAVE_DGA2
    // needed to change DGA video mode
!   int modecount, mX=100000, mY=100000 , mVBI=100000, mMaxY=0, i,j=0;
    int dga_modenum;
    XDGAMode   *modelines=NULL;
--- 773,777 ----
  #ifdef HAVE_DGA2
    // needed to change DGA video mode
!   int modecount, mX=VO_DGA_INVALID_RES, mY=VO_DGA_INVALID_RES , mVBI=100000, mMaxY=0, i,j=0;
    int dga_modenum;
    XDGAMode   *modelines=NULL;
***************
*** 777,781 ****
    unsigned int vm_ver, vm_rev;
    int i, j=0, have_vm=0;
!   int modecount, mX=100000, mY=100000, mVBI=100000, mMaxY=0, dga_modenum;  
  #endif
    int bank, ram;
--- 783,787 ----
    unsigned int vm_ver, vm_rev;
    int i, j=0, have_vm=0;
!   int modecount, mX=VO_DGA_INVALID_RES, mY=VO_DGA_INVALID_RES, mVBI=100000, mMaxY=0, dga_modenum;  
  #endif
    int bank, ram;
***************
*** 955,959 ****
       return 1;
    }
! 		         
  // now lets start the DGA thing 
  
--- 961,979 ----
       return 1;
    }
! 
!   if(vo_dga_vp_width == VO_DGA_INVALID_RES){
!     vd_printf( VD_ERR, "vo_dga: Something is wrong with your DGA. There doesn't seem to be a\n"
! 		       "single suitable mode!\n");
! #ifndef HAVE_DGA2
! #ifdef HAVE_XF86VM
!     if(vo_dga_vidmodes){
!        XFree(vo_dga_vidmodes);
!        vo_dga_vidmodes = NULL;
!     }
! #endif
! #endif
!     return 1;
!   }
!   
  // now lets start the DGA thing 
  


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list