summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_lavfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_lavfi.c')
-rw-r--r--video/filter/vf_lavfi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/filter/vf_lavfi.c b/video/filter/vf_lavfi.c
index b20383881a..03602aa702 100644
--- a/video/filter/vf_lavfi.c
+++ b/video/filter/vf_lavfi.c
@@ -342,9 +342,10 @@ static int vf_open(vf_instance_t *vf)
static bool is_single_video_only(const AVFilterPad *pads)
{
- if (!pads)
+ int count = avfilter_pad_count(pads);
+ if (count != 1)
return false;
- return pads[0].name && pads[0].type == AVMEDIA_TYPE_VIDEO && !pads[1].name;
+ return avfilter_pad_get_type(pads, 0) == AVMEDIA_TYPE_VIDEO;
}
// Does it have exactly one video input and one video output?