diff options
author | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-29 05:03:25 +0000 |
---|---|---|
committer | rfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-29 05:03:25 +0000 |
commit | a5dfcdf1576f5da33d57469ac939d095e87954fc (patch) | |
tree | 68c42b64b5acd705927529ea9b075e112e6e4976 /libvo | |
parent | 4d38521e2cd1e62ef334a73624cbd4a95f1de436 (diff) | |
download | mpv-a5dfcdf1576f5da33d57469ac939d095e87954fc.tar.bz2 mpv-a5dfcdf1576f5da33d57469ac939d095e87954fc.tar.xz |
quick hack to make vo_mga accept multiple calls to config
someone else should probably improve on this later
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5390 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/mga_common.c | 3 | ||||
-rw-r--r-- | libvo/vo_mga.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c index 53b5845d3e..0f1c4c6b42 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -9,7 +9,7 @@ static int mga_next_frame=0; static mga_vid_config_t mga_vid_config; static uint8_t *vid_data, *frames[4]; -static int f; +static int f = -1; static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ int x,y; @@ -334,6 +334,7 @@ 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); + f = -1; } static uint32_t preinit(const char *arg) diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index 9eaa6c5190..b7c9d361cf 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -62,6 +62,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin { char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; + if (f >= 0) mga_uninit(); if(!vo_screenwidth || !vo_screenheight) { int fd; struct fb_var_screeninfo fbinfo; |