[FFmpeg-devel] [PATCH] Fix compilation of static libraries with pthreads in MingW32
Mon Oct 5 12:27:47 CEST 2009
On Sun, Sep 6, 2009 at 8:47 AM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> On Mon, Aug 31, 2009 at 7:32 AM, Horacio Sanson<hsanson at gmail.com> wrote:
>> FFMpeg static libraries fail to compile with the --enable-pthreads
>> switch in a MingW32 environment. Before
>> I used this patch
>> but it no
>> longer applies to the latest SVN.
>> I am no expert making make files and need some help to improve this line:
>> -enabled libx264 ? ?&& require ?libx264 x264.h x264_encoder_open -lx264 -lm &&
>> +enabled libx264 ? ?&& require2 libx264 "stdint.h x264.h"
>> x264_encoder_open -lx264 -lpthreadGC2 -lws2_32 -lm &&
>> I am pretty sure adding "-lpthreadGC2 -lws2_32" is not correct as
>> pthreads depends on the configure flags but I do not
>> know how the correct way to do this. Without these flags added after
>> -lx264 I get unresolved symbol errors.
> This has already been discussed in
> I now patch pthreads-win32 to automatically initialize itself. More
> information here:
> It still requires a (simpler) patch for FFmpeg that can be found here:
> inside the latest packages under patches/ffmpeg-mingw32.diff
Thanks, I tried these patches (pthread and ffmpeg) and I was able to
compile ffmpeg (r20167) statically with pthread support. Unfortunately
ffmpeg crashed on all my tests encoding with x264. I also recompiled
x264 to use your pthreads library with your patch applied.
Note: I run Windows Vista Ultimate.
>> Also I ran the regression tests and "asf" failed (see output below)
>> but I think this has nothing to do with this changes.
> I think you didn't understand how the regression tests work. The last line says:
>> seek regression test: success
> Ramiro Polla
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel