summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoraurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-23 00:31:29 +0000
committeraurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-23 00:31:29 +0000
commitd715b5be37ed1b985a4a384d541b10be62b37c46 (patch)
tree002fe32c2908db0ceea729e64f92f4dab2a5a452 /libvo
parent24ea97d3f0b3c68901e2a6aef670bf34c1f422ed (diff)
downloadmpv-d715b5be37ed1b985a4a384d541b10be62b37c46.tar.bz2
mpv-d715b5be37ed1b985a4a384d541b10be62b37c46.tar.xz
call vbeGetControllerInfo() only once
Subsequent calls would fail with some video chip (including i945) when using -fixed-vo. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22785 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_vesa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 4676c43f1d..50df7f26be 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -620,7 +620,8 @@ static int set_refresh(unsigned x, unsigned y, unsigned mode,struct VesaCRTCInfo
static int
config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
- struct VbeInfoBlock vib;
+ static struct VbeInfoBlock vib;
+ static int vib_set;
struct VesaModeInfoBlock vmib;
struct VesaCRTCInfoBlock crtc_pass;
size_t i,num_modes;
@@ -649,12 +650,13 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
}
if((err=vbeInit()) != VBE_OK) { PRINT_VBE_ERR("vbeInit",err); return -1; }
memcpy(vib.VESASignature,"VBE2",4);
- if((err=vbeGetControllerInfo(&vib)) != VBE_OK)
+ if(!vib_set && (err=vbeGetControllerInfo(&vib)) != VBE_OK)
{
PRINT_VBE_ERR("vbeGetControllerInfo",err);
mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_VESA_PossibleReasonNoVbe2BiosFound);
return -1;
}
+ vib_set = 1;
/* Print general info here */
mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_VESA_FoundVesaVbeBiosVersion,
(int)(vib.VESAVersion >> 8) & 0xff,