mirror of https://github.com/mpv-player/mpv
add dealloc func
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1795 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e8d21b272f
commit
435bf332ca
|
@ -263,7 +263,9 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t
|
|||
drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
|
||||
printf( "[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
|
||||
}
|
||||
|
||||
#ifdef HAVE_NEW_GUI
|
||||
if ( vo_window == None )
|
||||
#endif
|
||||
saver_off(mDisplay); // turning off screen saver
|
||||
return 0;
|
||||
}
|
||||
|
@ -297,6 +299,15 @@ static void allocate_xvimage(int foo)
|
|||
return;
|
||||
}
|
||||
|
||||
static void deallocate_xvimage(int foo)
|
||||
{
|
||||
XShmDetach( mDisplay,&Shminfo[foo] );
|
||||
shmdt( Shminfo[foo].shmaddr );
|
||||
XFlush( mDisplay );
|
||||
XSync(mDisplay, False);
|
||||
return;
|
||||
}
|
||||
|
||||
static void check_events(void)
|
||||
{
|
||||
int e=vo_x11_check_events(mDisplay);
|
||||
|
@ -451,7 +462,13 @@ static uint32_t query_format(uint32_t format)
|
|||
}
|
||||
|
||||
static void uninit(void) {
|
||||
saver_on(mDisplay); // screen saver back on
|
||||
int i;
|
||||
#ifdef HAVE_NEW_GUI
|
||||
if ( vo_window == None )
|
||||
#endif
|
||||
saver_on(mDisplay); // screen saver back on
|
||||
for( i=0;i<num_buffers;i++ )
|
||||
deallocate_xvimage( i );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue