summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-23 20:18:06 +0000
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-23 20:18:06 +0000
commitabd22b8f480a261536151b89d03b2730b7056c8e (patch)
tree469b067673282b385aad57aba1193bd3cc208498 /libvo
parentb2189d29d959d80c1de614277036ea9fb2bf3445 (diff)
downloadmpv-abd22b8f480a261536151b89d03b2730b7056c8e.tar.bz2
mpv-abd22b8f480a261536151b89d03b2730b7056c8e.tar.xz
make use of the new MGA_VID_VERSION ioctl to check
whether the installed driver has the version we expect it to have. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26863 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/mga_common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index d286f36005..48b3bb91c0 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -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_subdevice)
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()) {