This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 5e0dddef80a1088fb5ce7b1b09d7c71580a82414 Author: Niklas Haas <[email protected]> AuthorDate: Mon May 11 19:16:12 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Fri May 15 18:53:05 2026 +0200 swscale/graph: move graph uninit logic to helper function Signed-off-by: Niklas Haas <[email protected]> --- libswscale/graph.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index 2020fcf8c7..c556e0391e 100644 --- a/libswscale/graph.c +++ b/libswscale/graph.c @@ -845,6 +845,17 @@ static void sws_graph_worker(void *priv, int jobnr, int threadnr, int nb_jobs, pass->run(graph->exec.output, graph->exec.input, slice_y, slice_h, pass); } +static void graph_uninit(SwsGraph *graph) +{ + avpriv_slicethread_free(&graph->slicethread); + + for (int i = 0; i < graph->num_passes; i++) + pass_free(graph->passes[i]); + av_free(graph->passes); + + memset(graph, 0, sizeof(*graph)); +} + int ff_sws_graph_create(SwsContext *ctx, const SwsFormat *dst, const SwsFormat *src, int field, SwsGraph **out_graph) { @@ -906,12 +917,7 @@ void ff_sws_graph_free(SwsGraph **pgraph) if (!graph) return; - avpriv_slicethread_free(&graph->slicethread); - - for (int i = 0; i < graph->num_passes; i++) - pass_free(graph->passes[i]); - av_free(graph->passes); - + graph_uninit(graph); av_free(graph); *pgraph = NULL; } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
