[FFmpeg-devel] libavcodec/pthread.c:138: error: no previous prototype for 'avcodec_thread_execute2'
Benoit Fouet
benoit.fouet
Mon Mar 8 11:43:20 CET 2010
On Mon, 08 Mar 2010 12:28:37 +0200 Georgi Chorbadzhiyski wrote:
> 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.
>
missing prototypes now results in an error.
> 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;
>
>
this one should be better:
Index: libavcodec/avcodec.h
===================================================================
--- libavcodec/avcodec.h (revision 22319)
+++ libavcodec/avcodec.h (working copy)
@@ -3256,6 +3256,7 @@ enum PixelFormat avcodec_default_get_for
int avcodec_thread_init(AVCodecContext *s, int thread_count);
void avcodec_thread_free(AVCodecContext *s);
int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
+int avcodec_thread_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
//FIXME func typedef
Ben
More information about the ffmpeg-devel
mailing list