[FFmpeg-cvslog] r19633 - trunk/libavcodec/w32thread.c
reimar
subversion
Wed Aug 12 15:25:38 CEST 2009
Author: reimar
Date: Wed Aug 12 15:25:37 2009
New Revision: 19633
Log:
Fix a memleak with win32 threads: the handle returned by _beginthreadex
must be closed (this differs from _beginthread).
Patch by Shehzad Salim (shehzadsalim gmail com)
Modified:
trunk/libavcodec/w32thread.c
Modified: trunk/libavcodec/w32thread.c
==============================================================================
--- trunk/libavcodec/w32thread.c Wed Aug 12 15:17:39 2009 (r19632)
+++ trunk/libavcodec/w32thread.c Wed Aug 12 15:25:37 2009 (r19633)
@@ -69,6 +69,7 @@ void avcodec_thread_free(AVCodecContext
WaitForSingleObject(c[i].thread, INFINITE);
if(c[i].work_sem) CloseHandle(c[i].work_sem);
if(c[i].done_sem) CloseHandle(c[i].done_sem);
+ if(c[i].thread) CloseHandle(c[i].thread);
}
av_freep(&s->thread_opaque);
More information about the ffmpeg-cvslog
mailing list