mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
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
This commit is contained in:
parent
4d38521e2c
commit
a5dfcdf157
@ -9,7 +9,7 @@ static int mga_next_frame=0;
|
|||||||
|
|
||||||
static mga_vid_config_t mga_vid_config;
|
static mga_vid_config_t mga_vid_config;
|
||||||
static uint8_t *vid_data, *frames[4];
|
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){
|
static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){
|
||||||
int x,y;
|
int x,y;
|
||||||
@ -334,6 +334,7 @@ static int mga_uninit(){
|
|||||||
ioctl( f,MGA_VID_OFF,0 );
|
ioctl( f,MGA_VID_OFF,0 );
|
||||||
munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames);
|
munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames);
|
||||||
close(f);
|
close(f);
|
||||||
|
f = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t preinit(const char *arg)
|
static uint32_t preinit(const char *arg)
|
||||||
|
@ -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";
|
char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
|
||||||
|
|
||||||
|
if (f >= 0) mga_uninit();
|
||||||
if(!vo_screenwidth || !vo_screenheight) {
|
if(!vo_screenwidth || !vo_screenheight) {
|
||||||
int fd;
|
int fd;
|
||||||
struct fb_var_screeninfo fbinfo;
|
struct fb_var_screeninfo fbinfo;
|
||||||
|
Loading…
Reference in New Issue
Block a user