ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Sat Mar 15 05:30:15 2025 +0100| [f9fe1e07ad4762cbafbef260fcd89cff97deda2a] | committer: Andreas Rheinhardt
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.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f9fe1e07ad4762cbafbef260fcd89cff97deda2a --- libavutil/slicethread.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavutil/slicethread.c b/libavutil/slicethread.c index e6b82e31b6..6593d58abc 100644 --- a/libavutil/slicethread.c +++ b/libavutil/slicethread.c @@ -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--; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".