]> git.sesse.net Git - vlc/commitdiff
fix h264 encoding in windows
authorHannes Domani <ssbssa@yahoo.de>
Wed, 28 Jan 2009 21:07:14 +0000 (22:07 +0100)
committerChristophe Mutricy <xtophe@videolan.org>
Sun, 8 Feb 2009 17:15:50 +0000 (17:15 +0000)
Signed-off-by: Christophe Mutricy <xtophe@videolan.org>
configure.ac
extras/contrib/src/Makefile
extras/contrib/src/Patches/pthreads-detach.patch [new file with mode: 0644]

index b33b2ac7d9c0450fd86d28ea014452d39163fd8b..319677fa4cb035492c44a2d96ccce484ef50e4ae 100644 (file)
@@ -3716,6 +3716,9 @@ if test "${enable_x264}" != "no"; then
         VLC_ADD_PLUGIN([x264])
         VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
         VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
+        if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
+          VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
+        fi
       ],[
         AC_MSG_ERROR([the specified tree hasn't been compiled])
       ])
@@ -3729,6 +3732,9 @@ if test "${enable_x264}" != "no"; then
         VLC_ADD_PLUGIN([x264])
         VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
         VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
+        if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
+          VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
+        fi
       ],[
         if test "${enable_x264}" = "yes"; then
             AC_MSG_ERROR([Could not find libx264 on your system: you may get it from http://www.videolan.org/x264.html])
index 46a0662a9a3d9f313f4ed83a150298d7f05b02e3..5e08a93d6ca03b9659221cbb44cc9bc8f9c75916 100644 (file)
@@ -2394,6 +2394,7 @@ pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz:
 
 pthreads: pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
        $(EXTRACT_GZ)
+       (cd $@; patch -p0 < ../Patches/pthreads-detach.patch)
 
 .pthreads: pthreads
        (cd $<; $(HOSTCC) make $(PTHREADSCONF) GC GC-static && mkdir -p $(PREFIX)/include && cp -v pthread.h sched.h semaphore.h $(PREFIX)/include/ && mkdir -p $(PREFIX)/lib && cp -v *.{a,dll} $(PREFIX)/lib/)
diff --git a/extras/contrib/src/Patches/pthreads-detach.patch b/extras/contrib/src/Patches/pthreads-detach.patch
new file mode 100644 (file)
index 0000000..73e9f36
--- /dev/null
@@ -0,0 +1,12 @@
+--- ptw32_processTerminate.c   Mon Jan 26 18:00:34 2009
++++ ptw32_processTerminate.c   Mon Jan 26 18:00:42 2009
+@@ -96,6 +96,9 @@
+         tp = tpNext;
+       }
++      ptw32_threadReuseTop = PTW32_THREAD_REUSE_EMPTY;
++      ptw32_threadReuseBottom = PTW32_THREAD_REUSE_EMPTY;
++
+       LeaveCriticalSection (&ptw32_thread_reuse_lock);
+       /*