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:
mflodman@google.com 2011-07-08 08:31:27 +00:00
parent 3675f9b121
commit 362b3e5811
2 changed files with 9 additions and 2 deletions

View File

@ -226,8 +226,13 @@ WebRtc_Word32 VideoX11Channel::ReleaseWindow()
__FUNCTION__);
CriticalSectionScoped cs(_crit);
return RemoveRenderer();
RemoveRenderer();
if (_display)
{
XCloseDisplay(_display);
_display = NULL;
}
return 0;
}
WebRtc_Word32 VideoX11Channel::CreateLocalRenderer(WebRtc_Word32 width,
@ -290,6 +295,7 @@ WebRtc_Word32 VideoX11Channel::RemoveRenderer()
XShmDetach(_display, &_shminfo);
XDestroyImage( _image );
shmdt(_shminfo.shmaddr);
XFreeGC(_display, _gc);
return 0;
}

View File

@ -153,6 +153,7 @@ ViEEncoder::~ViEEncoder()
delete &_rtpRtcp;
delete &_callbackCritsect;
delete &_dataCritsect;
delete _qmCallback;
}
// ============================================================================