0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vf: fix crash if filter doesn't provide control entrypoint

This input command crashed:

    vf add @mf:format=yuv420p ; show_text "${vf-metadata/mf}"

Fixes #1408.
This commit is contained in:
wm4 2014-12-30 13:21:36 +01:00
parent 0fa9986a98
commit a5832ba019

View File

@ -170,7 +170,7 @@ int vf_control_by_label(struct vf_chain *c,int cmd, void *arg, bstr label)
char *label_str = bstrdup0(NULL, label);
struct vf_instance *cur = vf_find_by_label(c, label_str);
talloc_free(label_str);
if (cur)
if (cur && cur->control)
return cur->control(cur, cmd, arg);
else
return CONTROL_UNKNOWN;