mirror of
https://github.com/mpv-player/mpv
synced 2024-11-07 01:47:00 +01:00
- if DGA fails to report some valid modes, vo_dga now exits gracefully
instead of crashing ... (100000x100000 bug ...) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1155 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b24a07ed9c
commit
e330ce9bcc
@ -23,6 +23,10 @@
|
||||
* - works only on x86 architectures
|
||||
*
|
||||
* $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.
|
||||
* Default in libvo is disabled.
|
||||
@ -155,6 +159,8 @@ static vo_info_t vo_info =
|
||||
//#define BITSPP (vo_dga_modes[vo_dga_active_mode].vdm_bitspp)
|
||||
//#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])
|
||||
|
||||
@ -766,7 +772,7 @@ static uint32_t init( uint32_t width, uint32_t height,
|
||||
|
||||
#ifdef HAVE_DGA2
|
||||
// needed to change DGA video mode
|
||||
int modecount, mX=100000, mY=100000 , mVBI=100000, mMaxY=0, i,j=0;
|
||||
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;
|
||||
XDGADevice *dgadevice;
|
||||
@ -776,7 +782,7 @@ static uint32_t init( uint32_t width, uint32_t height,
|
||||
unsigned int vm_event, vm_error;
|
||||
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;
|
||||
int modecount, mX=VO_DGA_INVALID_RES, mY=VO_DGA_INVALID_RES, mVBI=100000, mMaxY=0, dga_modenum;
|
||||
#endif
|
||||
int bank, ram;
|
||||
#endif
|
||||
@ -951,6 +957,20 @@ static uint32_t init( uint32_t width, uint32_t height,
|
||||
vo_dga_vidmodes = NULL;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user