[FFmpeg-devel] [PATCH] remove avcodec_*_execute from avcodec.h (Was: Re: libavcodec/pthread.c:138: error: no previous prototype for 'avcodec_thread_execute2')

Benoit Fouet benoit.fouet
Thu Mar 11 10:28:35 CET 2010


On Tue, 9 Mar 2010 14:54:03 +0100 Benoit Fouet wrote:
> On Tue, 09 Mar 2010 13:05:24 +0000 M?ns Rullg?rd wrote:
> > Benoit Fouet <benoit.fouet at free.fr> writes:
> > 
> > >> > Index: libavcodec/w32thread.c
> > >> > ===================================================================
> > >> > --- libavcodec/w32thread.c      (revision 22379)
> > >> > +++ libavcodec/w32thread.c      (working copy)
> > >> > @@ -93,7 +93,7 @@ void avcodec_thread_free(AVCodecContext
> > >> >      av_freep(&s->thread_opaque);
> > >> >  }
> > >> >
> > >> > -int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){
> > >> > +static int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){
> > >> >      ThreadContext *c= s->thread_opaque;
> > >> >      int i;
> > >> >      int jobnr = 0;
> > >> > Index: libavcodec/options.c
> > >> > ===================================================================
> > >> > --- libavcodec/options.c        (revision 22379)
> > >> > +++ libavcodec/options.c        (working copy)
> > >> > @@ -26,6 +26,7 @@
> > >> >
> > >> >  #include "avcodec.h"
> > >> >  #include "opt.h"
> > >> > +#include "internal.h"
> > >> >  #include <float.h>              /* FLT_MIN, FLT_MAX */
> > >> >
> > >> >  static const char* context_to_name(void* ptr) {
> > >> 
> > >> Why?
> > >> 
> > >
> > > because of the needed definition of avcodec_default_execute and
> > > avcodec_default_execute2 which are now there.
> > >
> > >> > Index: libavcodec/internal.h
> > >> > ===================================================================
> > >> > --- libavcodec/internal.h       (revision 22379)
> > >> > +++ libavcodec/internal.h       (working copy)
> > >> > @@ -48,4 +48,7 @@ AVHWAccel *ff_find_hwaccel(enum CodecID
> > >> >   */
> > >> >  int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b);
> > >> >
> > >> > +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);
> > >> > +
> > >> 
> > >> This looks wrong.  You're making the functions definitions static, so
> > >> there should be no prototypes in headers.  This shouldn't even compile.
> > >> 
> > >
> > > No, I am not. I think you are mixing avcodec_default_execute* and
> > > avcodec_thread_execute* definitions, aren't you ?
> > 
> > You're right.  I confused the two.
> > 
> 
> OK, so now I just need a "patch ok" stamp on any of the two proposed one.
> 

ping ?



More information about the ffmpeg-devel mailing list