Index: configure =================================================================== --- configure (revision 15624) +++ configure (working copy) @@ -1696,6 +1696,9 @@ add_extralibs -pthreads elif check_func pthread_create -lpthreadGC2; then add_extralibs -lpthreadGC2 + elif check_func pthread_create -lpthreadGC2 -lws2_32; then + add_cflags -DPTW32_STATIC_LIB + add_extralibs -lpthreadGC2 -lws2_32 elif ! check_lib pthread.h pthread_create -lpthread; then die "ERROR: can't find pthreads library" fi @@ -1735,7 +1738,7 @@ && require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0) enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg -enabled libx264 && require x264 x264.h x264_encoder_open -lx264 -lm \ +enabled libx264 && require2 x264 "stdint.h x264.h" x264_encoder_open -lx264 -lm \ && require_cpp_condition x264 x264.h "X264_BUILD >= 65" enabled libxvid && require Xvid xvid.h xvid_global -lxvidcore enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib Index: ffmpeg.c =================================================================== --- ffmpeg.c (revision 15624) +++ ffmpeg.c (working copy) @@ -3851,11 +3851,26 @@ { NULL, }, }; +#ifdef PTW32_STATIC_LIB +#include +static void detach_ptw32(void) +{ + pthread_win32_thread_detach_np(); + pthread_win32_process_detach_np(); +} +#endif + int main(int argc, char **argv) { int i; int64_t ti; +#ifdef PTW32_STATIC_LIB + pthread_win32_process_attach_np(); + pthread_win32_thread_attach_np(); + atexit(detach_ptw32); +#endif + avcodec_register_all(); avdevice_register_all(); av_register_all();