[FFmpeg-devel] Fix libx264

Felipe Contreras felipe.contreras
Tue Feb 16 04:23:28 CET 2010

2010/2/7 M?ns Rullg?rd <mans at mansr.com>:
> Felipe Contreras <felipe.contreras at gmail.com> writes:
>> Is it wrong in this case? If you want -pthread instead of -lpthread
>> then x264's pc file can be corrected.
> Wrong. ?The correct flag depends on the compiler, and .pc files don't
> take that into account. pkg-config is flawed. ?End of story.

I read a bit about -pthread vs -lpthread and it seems -pthread is
essentially '-D_REENTRANT -lpthread' but since x264 headers don't use
_REENTRANT, -pthread is the same as -lpthread.

Of course this is only true on certain platforms. Other platforms
mights prefer other flags. Note the word *platform* not compiler.

IOW; if x264 was compiled with -lpthread, that's what FFmpeg should
use, regardless of the compiler used. Otherwise linking to x264 will

So you are wrong; pkg-config is not flawed.

Anyway, regardless of what your opinions are, the fact remains the
same: FFmpeg compilation is broken for x264 as static library.

Felipe Contreras

More information about the ffmpeg-devel mailing list