From 435bf332ca971592aeb0692c2a8d7f5347d11c38 Mon Sep 17 00:00:00 2001 From: pontscho Date: Fri, 31 Aug 2001 10:06:32 +0000 Subject: [PATCH] add dealloc func git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1795 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 21 +++++++++++++++++++-- 1 file 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