[MPlayer-cvslog] r26863 - in trunk: help/help_mp-en.h libvo/mga_common.c

attila subversion at mplayerhq.hu
Fri May 23 22:18:06 CEST 2008


Author: attila
Date: Fri May 23 22:18:06 2008
New Revision: 26863

Log:
make use of the new MGA_VID_VERSION ioctl to check
whether the installed driver has the version
we expect it to have.


Modified:
   trunk/libvo/mga_common.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-en.h

Modified: trunk/libvo/mga_common.c
==============================================================================
--- trunk/libvo/mga_common.c	(original)
+++ trunk/libvo/mga_common.c	Fri May 23 22:18:06 2008
@@ -449,6 +449,7 @@ static int mga_uninit(){
 
 static int preinit(const char *vo_subdevice)
 {
+	uint32_t ver;
   const char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
 	sws_rgb2rgb_init(get_sws_cpuflags());
 
@@ -459,6 +460,16 @@ static int preinit(const char *vo_subdev
 		mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname);
 		return -1;
 	}
+	
+	// check whether the mga_vid driver has the same
+	// version as we expect
+	
+	ioctl(f,MGA_VID_GET_VERSION,&ver);
+	if(MGA_VID_VERSION != ver)
+	{
+		mp_msg(MSGT_VO, MSGL_ERR, MGSTR_LIBVO_MGA_mgavidVersionMissmatch, ver, MGA_VID_VERSION);
+		return -1;
+	}
 
 #ifdef VO_XMGA
   if (!vo_init()) {



More information about the MPlayer-cvslog mailing list