memleak fix by Raindel Shachar <raindel@techunix.technion.ac.il>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9982 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2003-04-24 19:07:46 +00:00
parent 3b929613b5
commit 540477f9ed
1 changed files with 3 additions and 2 deletions

View File

@ -58,7 +58,7 @@ LIBVO_EXTERN(xv)
static void allocate_xvimage(int);
static unsigned int ver,rel,req,ev,err;
static unsigned int formats, adaptors,i,xv_port,xv_format;
static XvAdaptorInfo *ai;
static XvAdaptorInfo *ai = NULL;
static XvImageFormatValues *fo;
static int current_buf=0;
@ -728,7 +728,8 @@ static void uninit(void)
{
int i;
if ( !vo_config_count ) return;
free( ai );
XvFreeAdaptorInfo(ai);
ai = NULL;
saver_on(mDisplay); // screen saver back on
for( i=0;i<num_buffers;i++ ) deallocate_xvimage( i );
#ifdef HAVE_XF86VM