[FFmpeg-devel] [PATCH] pthread detection on mingw + static pthread

Gianluigi Tiesi mplayer
Fri Apr 25 01:45:46 CEST 2008

On Thu, Apr 24, 2008 at 10:52:55PM +0100, Ramiro Polla wrote:
> Hello,
> Gianluigi Tiesi wrote:
> > On Thu, Apr 24, 2008 at 04:53:21AM +0100, Ramiro Polla wrote:
> >> libx264.diff uses require2 in configure
> >> pthreadsGC2_static.diff adds static pthreads-win32 support, given that a 
> >> certain patch be applied to x264 (which I'll send to the x264 
> >> mailinglist right away).
> >>
> > 
> > libx264.a does not need any patches
> Did you even read the link I passed? That patch makes x264 not 
> initialize any mutexes if no threads are specified since it's not going 
> to use them anyways.
> When I moved the initialization code from ffmpeg.c to phtreads.c, that 
> code would only be called if -threads x was given. If only 1 thread was 
> used, it would crash x264 attempting to create mutexes (without running 
> the init code). This is a bug in x264.

libx264 does not have any of win32 pthread attach code,
it's the executable that should take care of this
x264.c already does it

since the pthread code is only called in pthread.c
it should be ok to call it from there
are you sure that no other part of code of x264
(with pthread calls)
is called before pthread init?

perhaps I'm very annoyed to get flamed while willing to help


Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/

More information about the ffmpeg-devel mailing list