[FFmpeg-devel] libavcodec/pthread.c:138: error: no previous prototype for 'avcodec_thread_execute2'

Georgi Chorbadzhiyski gf
Mon Mar 8 11:28:37 CET 2010


This doesn't look right.

gf at gf:~/ffmpeg$ gcc --version
gcc (GCC) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

./configure \
    --disable-ffserver      \
    --disable-ffprobe       \
    --disable-ffplay        \
    --disable-ffmpeg        \
    --disable-avdevice      \
    --disable-encoders      \
    --disable-hwaccels      \
    --disable-muxers        \
    --disable-demuxers      \
    --disable-parsers       \
    --disable-protocols     \
    --disable-decoders      \
    --disable-bsfs          \
    --disable-indevs        \
    --disable-outdevs       \
    --disable-devices       \
    --disable-filters       \
    --disable-bzlib         \
    --enable-debug         \
    --enable-logging       \
    --enable-gprof         \
    --enable-pthreads       \
    --enable-muxer=flv      \
    --enable-demuxer=mpegts \
    --enable-parser=aac,h264 \
    --enable-decoder=aac,h264 \
    --enable-protocol=pipe,file,tcp,http

gf at gf:~/ffmpeg$ make
CC      libavcodec/pthread.o
libavcodec/pthread.c:138: error: no previous prototype for 'avcodec_thread_execute2'
make: *** [libavcodec/pthread.o] Error 1

This fixes it but I don't think this is the correct fix. It should not give error
here.

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 60c82cd..35f0306 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -133,6 +133,8 @@ int avcodec_thread_execute(AVCodecContext *avctx, action_func* func, void *arg,
     return 0;
 }

+int avcodec_thread_execute2(AVCodecContext *avctx, action_func2* func2, void *arg, int *ret, int job_count);
+
 int avcodec_thread_execute2(AVCodecContext *avctx, action_func2* func2, void *arg, int *ret, int job_count)
 {
     ThreadContext *c= avctx->thread_opaque;


-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/



More information about the ffmpeg-devel mailing list