Removing ViE memory leaks in Linux renderer and ViEEncoder.
Review URL: http://webrtc-codereview.appspot.com/62003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@182 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
3675f9b121
commit
362b3e5811
@ -226,8 +226,13 @@ WebRtc_Word32 VideoX11Channel::ReleaseWindow()
|
|||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
CriticalSectionScoped cs(_crit);
|
CriticalSectionScoped cs(_crit);
|
||||||
|
|
||||||
return RemoveRenderer();
|
RemoveRenderer();
|
||||||
|
if (_display)
|
||||||
|
{
|
||||||
|
XCloseDisplay(_display);
|
||||||
|
_display = NULL;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32 VideoX11Channel::CreateLocalRenderer(WebRtc_Word32 width,
|
WebRtc_Word32 VideoX11Channel::CreateLocalRenderer(WebRtc_Word32 width,
|
||||||
@ -290,6 +295,7 @@ WebRtc_Word32 VideoX11Channel::RemoveRenderer()
|
|||||||
XShmDetach(_display, &_shminfo);
|
XShmDetach(_display, &_shminfo);
|
||||||
XDestroyImage( _image );
|
XDestroyImage( _image );
|
||||||
shmdt(_shminfo.shmaddr);
|
shmdt(_shminfo.shmaddr);
|
||||||
|
XFreeGC(_display, _gc);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -153,6 +153,7 @@ ViEEncoder::~ViEEncoder()
|
|||||||
delete &_rtpRtcp;
|
delete &_rtpRtcp;
|
||||||
delete &_callbackCritsect;
|
delete &_callbackCritsect;
|
||||||
delete &_dataCritsect;
|
delete &_dataCritsect;
|
||||||
|
delete _qmCallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user