[vlc-devel] commit: fix h264 encoding in windows (Hannes Domani )

git version control git at videolan.org
Mon Feb 9 20:05:08 CET 2009


vlc | branch: 0.9-bugfix | Hannes Domani <ssbssa at yahoo.de> | Wed Jan 28 22:07:14 2009 +0100| [a586f63e8ccd211b34e632ee9ef123d8b3e62cc4] | committer: Jean-Baptiste Kempf 

fix h264 encoding in windows

Signed-off-by: Christophe Mutricy <xtophe at videolan.org>

(cherry picked from commit 31ff21f390ac1b59fab6a376b162cb02286164b7)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a586f63e8ccd211b34e632ee9ef123d8b3e62cc4
---

 configure.ac                                     |    6 ++++++
 extras/contrib/src/Makefile                      |    1 +
 extras/contrib/src/Patches/pthreads-detach.patch |   12 ++++++++++++
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index f6c69fd..28afb9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3732,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
       ],[
         AC_MSG_ERROR([the specified tree hasn't been compiled])
       ])
@@ -3745,6 +3748,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])
diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index 69ddd25..7be5ef3 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -2349,6 +2349,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
index 0000000..73e9f36
--- /dev/null
+++ b/extras/contrib/src/Patches/pthreads-detach.patch
@@ -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);
+ 
+       /* 




More information about the vlc-devel mailing list