1
diff -rpu -N unpatched-ffmpeg-mt/configure patched-ffmpeg-mt/configure
2
--- unpatched-ffmpeg-mt/configure 2010-03-29 16:40:27 -0700
3
+++ patched-ffmpeg-mt/configure 2010-03-31 19:01:13 -0700
4
@@ -1711,7 +1711,7 @@ if $cc -v 2>&1 | grep -qi ^gcc; then
5
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
6
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
11
elif $cc --version 2>/dev/null | grep -q Intel; then
13
@@ -2555,6 +2555,9 @@ if enabled pthreads; then
14
add_extralibs -pthreads
15
elif check_func pthread_create -lpthreadGC2; then
16
add_extralibs -lpthreadGC2
17
+ elif check_func pthread_create -lpthreadGC2 -lws2_32; then
18
+ add_cflags -DPTW32_STATIC_LIB
19
+ add_extralibs -lpthreadGC2 -lws2_32
20
elif ! check_lib pthread.h pthread_create -lpthread; then
21
die "ERROR: can't find pthreads library"
23
@@ -2752,7 +2755,7 @@ elif enabled ccc; then
24
elif enabled gcc; then
25
check_cflags -fno-tree-vectorize
26
check_cflags -Werror=implicit
27
- check_cflags -Werror=missing-prototypes
28
+# check_cflags -Werror=missing-prototypes
29
elif enabled clang; then
30
check_cflags -Qunused-arguments
31
elif enabled armcc; then
32
diff -rpu -N unpatched-ffmpeg-mt/libavcodec/allcodecs.c patched-ffmpeg-mt/libavcodec/allcodecs.c
33
--- unpatched-ffmpeg-mt/libavcodec/allcodecs.c 2010-03-29 14:43:02 -0700
34
+++ patched-ffmpeg-mt/libavcodec/allcodecs.c 2010-03-31 19:01:13 -0700
36
extern AVBitStreamFilter x##_bsf; \
37
if(CONFIG_##X##_BSF) av_register_bitstream_filter(&x##_bsf); }
39
+#ifdef PTW32_STATIC_LIB
40
+static void detach_ptw32(void)
42
+ pthread_win32_thread_detach_np();
43
+ pthread_win32_process_detach_np();
47
void avcodec_register_all(void)
49
static int initialized;
50
@@ -53,6 +61,11 @@ void avcodec_register_all(void)
54
+#ifdef PTW32_STATIC_LIB
55
+ pthread_win32_process_attach_np();
56
+ pthread_win32_thread_attach_np();
57
+ atexit(detach_ptw32);
59
/* hardware accelerators */
60
REGISTER_HWACCEL (H263_VAAPI, h263_vaapi);
61
REGISTER_HWACCEL (H264_DXVA2, h264_dxva2);
1
diff -rpu -N orig/configure ffmpeg-mt/configure
2
--- orig/configure 2010-07-27 13:05:17.865562700 -0700
3
+++ ffmpeg-mt/configure 2010-07-27 13:05:29.670743100 -0700
4
@@ -1788,7 +1788,7 @@ if $cc -v 2>&1 | grep -qi ^gcc; then
5
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
6
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
11
elif $cc --version 2>/dev/null | grep -q Intel; then
13
@@ -2607,6 +2607,9 @@ if ! disabled pthreads && ! enabled w32t
14
add_extralibs -pthreads
15
elif check_func pthread_create -lpthreadGC2; then
16
add_extralibs -lpthreadGC2
17
+ elif check_func pthread_create -lpthreadGC2 -lws2_32; then
18
+ add_cflags -DPTW32_STATIC_LIB
19
+ add_extralibs -lpthreadGC2 -lws2_32
20
elif ! check_lib pthread.h pthread_create -lpthread; then
23
@@ -2823,7 +2826,6 @@ elif enabled ccc; then
24
elif enabled gcc; then
25
check_cflags -fno-tree-vectorize
26
check_cflags -Werror=implicit-function-declaration
27
- check_cflags -Werror=missing-prototypes
28
elif enabled clang; then
29
check_cflags -Qunused-arguments
30
elif enabled armcc; then
31
diff -rpu -N orig/libavcodec/allcodecs.c ffmpeg-mt/libavcodec/allcodecs.c
32
--- orig/libavcodec/allcodecs.c 2010-07-27 13:05:18.281604300 -0700
33
+++ ffmpeg-mt/libavcodec/allcodecs.c 2010-07-27 13:05:29.675743600 -0700
35
extern AVBitStreamFilter x##_bsf; \
36
if(CONFIG_##X##_BSF) av_register_bitstream_filter(&x##_bsf); }
38
+#ifdef PTW32_STATIC_LIB
39
+static void detach_ptw32(void)
41
+ pthread_win32_thread_detach_np();
42
+ pthread_win32_process_detach_np();
46
void avcodec_register_all(void)
48
static int initialized;
49
@@ -53,6 +61,11 @@ void avcodec_register_all(void)
53
+#ifdef PTW32_STATIC_LIB
54
+ pthread_win32_process_attach_np();
55
+ pthread_win32_thread_attach_np();
56
+ atexit(detach_ptw32);
58
/* hardware accelerators */
59
REGISTER_HWACCEL (H263_VAAPI, h263_vaapi);
60
REGISTER_HWACCEL (H264_DXVA2, h264_dxva2);