[FFmpeg-user] avformat_find_stream_info broken recently with multiple threads?

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Jan 3 15:02:59 CET 2013


Dennis Volodomanov <volodomanov <at> gmail.com> writes:

> Carl Eugen Hoyos wrote:
> >> However, if I change pthread_create() to phread_create(NULL, NULL, NULL,
> >> NULL) then it compiles to an .o file without warnings.
> >
> > But does it also compile to an executable?
> 
> Ah, sorry, no - it doesn't. Fails with the same:
> 
> ./test.o:test.c:(.text+0x2e): undefined reference to `_imp__pthread_create'
> collect2: error: ld returned 1 exit status

Thank you.

Does the following inlined patch fix configure?
Ie, is pthread disabled if you try 
"./configure --disable-w32threads" but enabled if 
you add the necessary define?

Thank you, Carl Eugen


diff --git a/configure b/configure
index 32f7eb1..9b51e96 100755
--- a/configure
+++ b/configure
@@ -3767,17 +3767,17 @@ fi
 # do this before the optional library checks as some of them require pthreads
 if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
     enable pthreads
-    if check_func pthread_create; then
+    if check_lib2 pthread.h pthread_create; then
         :
-    elif check_func pthread_create -pthread; then
+    elif check_lib2 pthread.h pthread_create -pthread; then
         add_cflags -pthread
         add_extralibs -pthread
-    elif check_func pthread_create -pthreads; then
+    elif check_lib2 pthread.h pthread_create -pthreads; then
         add_cflags -pthreads
         add_extralibs -pthreads
-    elif check_func pthread_create -lpthreadGC2; then
+    elif check_lib2 pthread.h pthread_create -lpthreadGC2; then
         add_extralibs -lpthreadGC2
-    elif ! check_lib pthread.h pthread_create -lpthread; then
+    elif ! check_lib2 pthread.h pthread_create -lpthread; then
         disable pthreads
     fi
 fi




More information about the ffmpeg-user mailing list