[FFmpeg-devel] missing CloseHandle in avcodec_thread_free in win32 implementation

Alex Sadovsky alexeysad
Sun Sep 23 14:58:25 CEST 2007

Hello FFMpeg developers! Thank you for your hard work!

I think I have found a small resource leak in the win32 version of
avcodec_thread_free(AVCodecContext *).
According to MSDN you have to manually CloseHandle a thread handle returned
by _beginthreadex().
So, every time you do avcodec_open/avcodec_close you loose some valuable
kernel memory.

More information about the ffmpeg-devel mailing list