You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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:
@ -224,13 +224,12 @@ void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_mai
|
|||||||
|
|
||||||
void avpriv_slicethread_free(AVSliceThread **pctx)
|
void avpriv_slicethread_free(AVSliceThread **pctx)
|
||||||
{
|
{
|
||||||
AVSliceThread *ctx;
|
AVSliceThread *ctx = *pctx;
|
||||||
int nb_workers, i;
|
int nb_workers, i;
|
||||||
|
|
||||||
if (!pctx || !*pctx)
|
if (!ctx)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ctx = *pctx;
|
|
||||||
nb_workers = ctx->nb_threads;
|
nb_workers = ctx->nb_threads;
|
||||||
if (!ctx->main_func)
|
if (!ctx->main_func)
|
||||||
nb_workers--;
|
nb_workers--;
|
||||||
|
Reference in New Issue
Block a user