[FFmpeg-devel] [PATCH] Make execute() and execute2() return FFMIN() of thread return codes

Michael Niedermayer michael at niedermayer.cc
Fri Jun 17 02:38:07 EEST 2022


On Thu, Jun 16, 2022 at 11:04:01PM +0200, Tomas Härdin wrote:
> tor 2022-06-16 klockan 20:27 +0200 skrev Michael Niedermayer:
> > 
> > >  
> > >  void avpriv_slicethread_free(AVSliceThread **pctx)
> > > @@ -236,8 +244,8 @@ void avpriv_slicethread_free(AVSliceThread
> > > **pctx)
> > >  #else /* HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS32THREADS */
> > >  
> > >  int avpriv_slicethread_create(AVSliceThread **pctx, void *priv,
> > > -                              void (*worker_func)(void *priv, int
> > > jobnr, int threadnr, int nb_jobs, int nb_threads),
> > > -                              void (*main_func)(void *priv),
> > > +                              int (*worker_func)(void *priv, int
> > > jobnr, int threadnr, int nb_jobs, int nb_threads),
> > > +                              int (*main_func)(void *priv),
> > >                                int nb_threads)
> > >  {
> > >      *pctx = NULL;
> > 
> > You forgot to update the fallback code when threads are disabled
> 
> Uhm, the existing code just abort()s if threads are disabled? I'm not
> really sure if there anything that can or should be done there

Before your patches fate passes with --disable-pthreads
afterwards it will fail during build because the function mismatches,
the abort should not be reachable i hope

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220617/60b46e4e/attachment.sig>


More information about the ffmpeg-devel mailing list