Commit aff01de6 authored by Anton Khirnov's avatar Anton Khirnov

graphparser: set next to NULL on an entry extracted from inputs list

Prevents it from referring to the rest of the list.
parent 7ce118ba
......@@ -229,9 +229,10 @@ static int link_filter_inouts(AVFilterContext *filt_ctx,
for (pad = 0; pad < filt_ctx->input_count; pad++) {
AVFilterInOut *p = *curr_inputs;
if (p)
if (p) {
*curr_inputs = (*curr_inputs)->next;
else if (!(p = av_mallocz(sizeof(*p))))
p->next = NULL;
} else if (!(p = av_mallocz(sizeof(*p))))
return AVERROR(ENOMEM);
if (p->filter_ctx) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment