You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
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) Originally committed as revision 19633 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
committed by
Reimar Döffinger
parent
c0b88f1920
commit
51fdb6f08d
@@ -69,6 +69,7 @@ void avcodec_thread_free(AVCodecContext *s){
|
|||||||
WaitForSingleObject(c[i].thread, INFINITE);
|
WaitForSingleObject(c[i].thread, INFINITE);
|
||||||
if(c[i].work_sem) CloseHandle(c[i].work_sem);
|
if(c[i].work_sem) CloseHandle(c[i].work_sem);
|
||||||
if(c[i].done_sem) CloseHandle(c[i].done_sem);
|
if(c[i].done_sem) CloseHandle(c[i].done_sem);
|
||||||
|
if(c[i].thread) CloseHandle(c[i].thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
av_freep(&s->thread_opaque);
|
av_freep(&s->thread_opaque);
|
||||||
|
|||||||
Reference in New Issue
Block a user