mirror of
https://github.com/mpv-player/mpv
synced 2025-04-27 05:39:21 +00:00
fix memleak
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7766 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
898e7af0fb
commit
0020017268
@ -362,9 +362,14 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc );
|
||||||
vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv );
|
vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv );
|
||||||
|
|
||||||
if ( myximage ) freeMyXImage();
|
if ( myximage )
|
||||||
|
{
|
||||||
|
freeMyXImage();
|
||||||
|
freeSwsContext(swsContext);
|
||||||
|
}
|
||||||
getMyXImage();
|
getMyXImage();
|
||||||
|
|
||||||
if ( !WinID )
|
if ( !WinID )
|
||||||
|
@ -290,7 +290,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
|
|||||||
num_buffers=vo_doublebuffering?(vo_directrendering?NUM_BUFFERS:2):1;
|
num_buffers=vo_doublebuffering?(vo_directrendering?NUM_BUFFERS:2):1;
|
||||||
|
|
||||||
/* check image formats */
|
/* check image formats */
|
||||||
fo = XvListImageFormats(mDisplay, xv_port, (int*)&formats);
|
|
||||||
xv_format=0;
|
xv_format=0;
|
||||||
if(format==IMGFMT_BGR24) format=IMGFMT_YV12;
|
if(format==IMGFMT_BGR24) format=IMGFMT_YV12;
|
||||||
for(i = 0; i < formats; i++){
|
for(i = 0; i < formats; i++){
|
||||||
@ -387,7 +386,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
|
|||||||
} else
|
} else
|
||||||
if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
|
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);
|
vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
|
||||||
XFlush(mDisplay);
|
XFlush(mDisplay);
|
||||||
XSync(mDisplay, False);
|
XSync(mDisplay, False);
|
||||||
|
Loading…
Reference in New Issue
Block a user