summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-18 17:13:13 +0100
committerwm4 <wm4@nowhere>2013-12-18 17:13:13 +0100
commit6ae36d3225825b6dd3dd5a99c3d33cfbe6991633 (patch)
tree3d2eca1755211b063653da2049e465a5fe14d7df /video
parentb170248389b9129a7485d9fd0377c755b162de45 (diff)
downloadmpv-6ae36d3225825b6dd3dd5a99c3d33cfbe6991633.tar.bz2
mpv-6ae36d3225825b6dd3dd5a99c3d33cfbe6991633.tar.xz
vf_lavfi: don't access AVFilterPad directly
Direct access is deprecated.
Diffstat (limited to 'video')
-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?