1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Prevents it from referring to the rest of the list.
This commit is contained in:
Anton Khirnov 2012-04-15 21:08:37 +02:00
parent 7ce118bae5
commit aff01de641

View File

@ -229,9 +229,10 @@ static int link_filter_inouts(AVFilterContext *filt_ctx,
for (pad = 0; pad < filt_ctx->input_count; pad++) { for (pad = 0; pad < filt_ctx->input_count; pad++) {
AVFilterInOut *p = *curr_inputs; AVFilterInOut *p = *curr_inputs;
if (p) if (p) {
*curr_inputs = (*curr_inputs)->next; *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); return AVERROR(ENOMEM);
if (p->filter_ctx) { if (p->filter_ctx) {