* commit 'ac84c1ce24a285f9cf16d4297bce73b1c4a6e435': avfilter: check filter link validity Conflicts: libavfilter/avfilter.c
Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all
Unified · Split
| @@ -227,6 +227,11 @@ int avfilter_config_links(AVFilterContext *filter) · 226 unmodified lines | |||
| 227 | AVFilterLink *inlink; | 227 | AVFilterLink *inlink; |
| 228 | 228 | ||
| 229 | if (!link) continue; | 229 | if (!link) continue; |
| 230 | if (!link->src || !link->dst) { | ||
| 231 | av_log(filter, AV_LOG_ERROR, | ||
| 232 | "Not all input and output are properly linked (%d).\n", i); | ||
| 233 | return AVERROR(EINVAL); | ||
| 234 | } | ||
| 230 | 235 | ||
| 231 | inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL; | 236 | inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL; |
| 232 | link->current_pts = AV_NOPTS_VALUE; | 237 | link->current_pts = AV_NOPTS_VALUE; |