# HG changeset patch # User pontscho # Date 1034808249 0 # Node ID dbf1e5cfadbd8506c946411ffcd3c03073c6e3a8 # Parent 13c36b2d1d4512c9a63eeb51c54fd076c3ba7126 fix memleak diff -r 13c36b2d1d45 -r dbf1e5cfadbd libvo/vo_x11.c --- a/libvo/vo_x11.c Wed Oct 16 22:29:00 2002 +0000 +++ b/libvo/vo_x11.c Wed Oct 16 22:44:09 2002 +0000 @@ -362,9 +362,14 @@ #endif } + if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv ); - if ( myximage ) freeMyXImage(); + if ( myximage ) + { + freeMyXImage(); + freeSwsContext(swsContext); + } getMyXImage(); if ( !WinID ) diff -r 13c36b2d1d45 -r dbf1e5cfadbd libvo/vo_xv.c --- a/libvo/vo_xv.c Wed Oct 16 22:29:00 2002 +0000 +++ b/libvo/vo_xv.c Wed Oct 16 22:44:09 2002 +0000 @@ -290,7 +290,6 @@ num_buffers=vo_doublebuffering?(vo_directrendering?NUM_BUFFERS:2):1; /* check image formats */ - fo = XvListImageFormats(mDisplay, xv_port, (int*)&formats); xv_format=0; if(format==IMGFMT_BGR24) format=IMGFMT_YV12; for(i = 0; i < formats; i++){ @@ -387,7 +386,7 @@ } else if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height ); - + if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv); XFlush(mDisplay); XSync(mDisplay, False);