Commit eb553096 authored by Xi Wang's avatar Xi Wang Committed by Michael Niedermayer

lavfi: fix null checking in avfilter_config_links()

Move the first use of `link' after the null pointer check.
Signed-off-by: 's avatarXi Wang <xi.wang@gmail.com>
Reviewed-by: 's avatarStefano Sabatini <stefasab@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cb1c69c8
......@@ -222,11 +222,11 @@ int avfilter_config_links(AVFilterContext *filter)
for (i = 0; i < filter->nb_inputs; i ++) {
AVFilterLink *link = filter->inputs[i];
AVFilterLink *inlink = link->src->nb_inputs ?
link->src->inputs[0] : NULL;
AVFilterLink *inlink;
if (!link) continue;
inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL;
link->current_pts = AV_NOPTS_VALUE;
switch (link->init_state) {
......
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