lavfi: fix null checking in avfilter_config_links()

Move the first use of `link' after the null pointer check.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Xi Wang 2013-01-20 15:38:21 -05:00 committed by Michael Niedermayer
parent cb1c69c81d
commit eb553096e5
1 changed files with 2 additions and 2 deletions

View File

@ -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) {