diff options
author | Xi Wang <[email protected]> | 2013-01-20 15:38:21 -0500 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2013-01-21 00:07:00 +0100 |
commit | eb553096e59898328ba4ac406ff5a25c29d59f0d (patch) | |
tree | cfae6276b66e2b779909300fbf13189b4b66e519 | |
parent | cb1c69c81d913b793cb569c99ad8e4348068a535 (diff) |
lavfi: fix null checking in avfilter_config_links()
Move the first use of `link' after the null pointer check.
Signed-off-by: Xi Wang <[email protected]>
Reviewed-by: Stefano Sabatini <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavfilter/avfilter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 8c06173c83..4759d13c5f 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -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) { |