From 6ae36d3225825b6dd3dd5a99c3d33cfbe6991633 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Dec 2013 17:13:13 +0100 Subject: vf_lavfi: don't access AVFilterPad directly Direct access is deprecated. --- video/filter/vf_lavfi.c | 5 +++-- 1 file 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? -- cgit v1.2.3