diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-31 10:06:32 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-08-31 10:06:32 +0000 |
commit | 435bf332ca971592aeb0692c2a8d7f5347d11c38 (patch) | |
tree | ba0b7a39535a2e5f829d00e1c7ada6136014f121 /libvo | |
parent | e8d21b272f8f11a8fde8bd5cc06e020a89ce1597 (diff) | |
download | mpv-435bf332ca971592aeb0692c2a8d7f5347d11c38.tar.bz2 mpv-435bf332ca971592aeb0692c2a8d7f5347d11c38.tar.xz |
add dealloc func
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1795 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_xv.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 89e842efe0..b1118ab8a5 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -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 ); } |