[MPlayer-dev-eng] [PATCH] Windows GUI with mingw64 and cygwin?revised part 2

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat May 7 09:32:16 CEST 2011


On Fri, May 06, 2011 at 08:39:11PM +0000, Stephen Sheldon wrote:
>  <emild <at> cs.technion.ac.il> writes:
> 
> 
> > Sorry for the late comment, but is blindly replacing _beginthreadex() with
> > CreateThread() a good idea? AFAIK programs which use the MS C runtime library
> > should use _beginthreadex() instead of CreateThread() as the former does some
> > thread-specific initialization. Using plain CreateThread() with the MS C
> > runtime library can cause memory leaks. 
> > 
> > See also:
> > 
> > http://support.microsoft.com/kb/104641/en-us
> > 
> > > 
> > > > Do it right away.
> > > 
> > > Committed.
> > > 
> > > Ingo
> > 
> >                                                            Regards,
> >                                                                 Emil
> Cygwin does not use the MS C runtime and indeed _beginthreadex is not
> available when mplayer is linked under Cygwin.
> 
> Perhaps I should have used a compiler flag to call CreateThread,
> like this

#define _beginthreadex CreateThread


More information about the MPlayer-dev-eng mailing list