mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
avfilter: check filter link validity
Remove now redundant check. CC: libav-stable@libav.org Bug-Id: CID 700371
This commit is contained in:
parent
556a5090f2
commit
a7e79f6a43
@ -152,6 +152,11 @@ int avfilter_config_links(AVFilterContext *filter)
|
|||||||
AVFilterLink *link = filter->inputs[i];
|
AVFilterLink *link = filter->inputs[i];
|
||||||
|
|
||||||
if (!link) continue;
|
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) {
|
switch (link->init_state) {
|
||||||
case AVLINK_INIT:
|
case AVLINK_INIT:
|
||||||
@ -181,7 +186,7 @@ int avfilter_config_links(AVFilterContext *filter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (link->time_base.num == 0 && link->time_base.den == 0)
|
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;
|
link->src->inputs[0]->time_base : AV_TIME_BASE_Q;
|
||||||
|
|
||||||
if (link->type == AVMEDIA_TYPE_VIDEO) {
|
if (link->type == AVMEDIA_TYPE_VIDEO) {
|
||||||
|
Loading…
Reference in New Issue
Block a user