diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-22 21:34:27 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-22 21:34:27 +0000 |
commit | 9927fe4b42cf5d6cf612ddb250e32446a2a511e2 (patch) | |
tree | 241384c2f2035d8f6163ab21e0337e1c6079f951 /libvo | |
parent | 93e3f1b2fb3c3e1fcfde36832729e41d5ef0b526 (diff) | |
download | mpv-9927fe4b42cf5d6cf612ddb250e32446a2a511e2.tar.bz2 mpv-9927fe4b42cf5d6cf612ddb250e32446a2a511e2.tar.xz |
fixed mga uninit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1638 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/mga_common.c | 5 | ||||
-rw-r--r-- | libvo/vo_mga.c | 4 | ||||
-rw-r--r-- | libvo/vo_xmga.c | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c index 71d0ab6d0e..f0a8e9006f 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -211,3 +211,8 @@ static int mga_init(){ } +static int mga_uninit(){ + ioctl( f,MGA_VID_OFF,0 ); + munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames); + close(f); +} diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index 45f7e67d22..7cc5f7417f 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -109,8 +109,8 @@ get_info(void) static void uninit(void) { - ioctl( f,MGA_VID_OFF,0 ); -printf("vo: uninit!\n"); + mga_uninit(); + printf("vo: uninit!\n"); } static void draw_osd(void) diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 790f1ce6f0..35d7f7911c 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -196,6 +196,7 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_ f = open(devname,O_RDWR); if(f == -1) { + perror("open"); printf("Couldn't open %s\n",devname); return(-1); } @@ -339,6 +340,6 @@ static void uninit(void) { saver_on(mDisplay); - ioctl( f,MGA_VID_OFF,0 ); -printf("vo: uninit!\n"); + mga_uninit(); + printf("vo: uninit!\n"); } |