diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-20 14:11:13 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-24 23:42:19 +0100 |
commit | ac84c1ce24a285f9cf16d4297bce73b1c4a6e435 (patch) | |
tree | 9a084fb80cf2c1f761278500cd9e50138d55d60f | |
parent | ef363ebd596da18f889a7d4845023a23dfac84c9 (diff) | |
download | ffmpeg-ac84c1ce24a285f9cf16d4297bce73b1c4a6e435.tar.gz |
avfilter: check filter link validity
Remove now redundant check.
CC: libav-stable@libav.org
Bug-Id: CID 700371
-rw-r--r-- | libavfilter/avfilter.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index c9617dc2ff..40989731cf 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -152,6 +152,11 @@ int avfilter_config_links(AVFilterContext *filter) AVFilterLink *link = filter->inputs[i]; if (!link) continue; + if (!link->src || !link->dst) { + av_log(filter, AV_LOG_ERROR, + "Not all input and output are properly linked (%d).\n", i); + return AVERROR(EINVAL); + } switch (link->init_state) { case AVLINK_INIT: @@ -181,7 +186,7 @@ int avfilter_config_links(AVFilterContext *filter) } if (link->time_base.num == 0 && link->time_base.den == 0) - link->time_base = link->src && link->src->nb_inputs ? + link->time_base = link->src->nb_inputs ? link->src->inputs[0]->time_base : AV_TIME_BASE_Q; if (link->type == AVMEDIA_TYPE_VIDEO) { |