[FFmpeg-devel] [PATCH] Make execute() and execute2() return FFMIN() of thread return codes
Anton Khirnov
anton at khirnov.net
Sat Jun 18 17:38:48 EEST 2022
Quoting Tomas Härdin (2022-06-17 11:42:25)
> fre 2022-06-17 klockan 01:38 +0200 skrev Michael Niedermayer:
> > 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
>
> Updated patch attached
>
> /Tomas
>
> From e3729f70d016b8e5c9d1bdb6014506ddd8d4eb56 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git at haerdin.se>
> Date: Thu, 16 Jun 2022 12:16:44 +0200
> Subject: [PATCH] Make execute() and execute2() return FFMIN() of thread return
> codes
>
> At the moment only fic.c actually checks return code of execute() hence the change to its FATE reference
Wait, how does this follow?
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list