summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia-audiodev/wmme_dev.c
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2009-03-27 15:36:18 +0000
committerNanang Izzuddin <nanang@teluu.com>2009-03-27 15:36:18 +0000
commit5492839463ed59db098169cd486ed9eb585d48e2 (patch)
tree6fec8e606dc658e297fddf2d18f96afc877f70bd /pjmedia/src/pjmedia-audiodev/wmme_dev.c
parentd5a9aa169afe9e09410f295c5f0e9f3ddf2bad09 (diff)
Ticket #771 (auddev-misc): Fixed handle leak in WMME, handle of thread quit event never got closed.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2557 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia-audiodev/wmme_dev.c')
-rw-r--r--pjmedia/src/pjmedia-audiodev/wmme_dev.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia-audiodev/wmme_dev.c b/pjmedia/src/pjmedia-audiodev/wmme_dev.c
index 720ae0c1..02448939 100644
--- a/pjmedia/src/pjmedia-audiodev/wmme_dev.c
+++ b/pjmedia/src/pjmedia-audiodev/wmme_dev.c
@@ -1256,6 +1256,7 @@ static pj_status_t stream_destroy(pjmedia_aud_stream *strm)
stream_stop(strm);
+ /* Stop the stream thread */
if (stream->thread)
{
SetEvent(stream->thread_quit_event);
@@ -1264,6 +1265,13 @@ static pj_status_t stream_destroy(pjmedia_aud_stream *strm)
stream->thread = NULL;
}
+ /* Close the thread quit event */
+ if (stream->thread_quit_event)
+ {
+ CloseHandle(stream->thread_quit_event);
+ stream->thread_quit_event = NULL;
+ }
+
/* Unprepare the headers and close the play device */
if (stream->play_strm.hWave.Out)
{