avutil/slicethread: Remove NULL pointer check when freeing
avpriv_slicethread_free() is one of our functions that takes a pointer to a pointer and resets the pointer when done. It is legal for such functions to be passed a pointer to a NULL pointer, yet passing a NULL pointer would be insane and should not be tolerated. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
7d1bf0ac7a
commit
f9fe1e07ad
1 changed files with 2 additions and 3 deletions
|
|
@ -224,13 +224,12 @@ void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_mai
|
|||
|
||||
void avpriv_slicethread_free(AVSliceThread **pctx)
|
||||
{
|
||||
AVSliceThread *ctx;
|
||||
AVSliceThread *ctx = *pctx;
|
||||
int nb_workers, i;
|
||||
|
||||
if (!pctx || !*pctx)
|
||||
if (!ctx)
|
||||
return;
|
||||
|
||||
ctx = *pctx;
|
||||
nb_workers = ctx->nb_threads;
|
||||
if (!ctx->main_func)
|
||||
nb_workers--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue