Mercurial > mplayer.hg
changeset 5158:3dbceaff9f77
uninit bugs fixed
author | arpi |
---|---|
date | Sun, 17 Mar 2002 03:38:16 +0000 |
parents | f67b321e1eda |
children | 663ededc1961 |
files | libvo/vo_xmga.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_xmga.c Sun Mar 17 02:59:04 2002 +0000 +++ b/libvo/vo_xmga.c Sun Mar 17 03:38:16 2002 +0000 @@ -185,6 +185,8 @@ vo_mga_flip_page(); } +static int inited=0; + static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format,const vo_tune_info_t* info) { char * frame_mem; @@ -266,6 +268,8 @@ default: printf( "Sorry, this (%d) color depth not supported.\n",vo_depthonscreen ); return -1; } + inited=1; + aspect(&d_width,&d_height,A_NOZOOM); #ifdef HAVE_NEW_GUI if ( vo_window == None ) @@ -349,14 +353,11 @@ static void uninit(void) { + if(!inited) return; + inited=0; + mga_uninit(); saver_on(mDisplay); -#ifdef HAVE_NEW_GUI - if ( vo_window == None ) -#endif - { - XDestroyWindow( mDisplay,vo_window ); - } - mga_uninit(); + vo_x11_uninit(mDisplay, vo_window); printf("vo: uninit!\n"); }