diff options
author | wm4 <wm4@nowhere> | 2016-01-22 16:18:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-01-22 16:18:28 +0100 |
commit | 135a7217b92c0b1c29ea40ab405566e72d23ae4b (patch) | |
tree | 491bfc975d15c4df6095a30720dd9bd404f73e70 /video/filter/vf_lavfi.c | |
parent | ce0b26c60ff31166b4b4317d269c52fe7d576c5c (diff) | |
download | mpv-135a7217b92c0b1c29ea40ab405566e72d23ae4b.tar.bz2 mpv-135a7217b92c0b1c29ea40ab405566e72d23ae4b.tar.xz |
command: add vf-command command
Diffstat (limited to 'video/filter/vf_lavfi.c')
-rw-r--r-- | video/filter/vf_lavfi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/video/filter/vf_lavfi.c b/video/filter/vf_lavfi.c index e1705f6874..8cfd27a7bd 100644 --- a/video/filter/vf_lavfi.c +++ b/video/filter/vf_lavfi.c @@ -335,6 +335,14 @@ static int control(vf_instance_t *vf, int request, void *data) case VFCTRL_SEEK_RESET: reset(vf); return CONTROL_OK; + case VFCTRL_COMMAND: { + if (!vf->priv->graph) + break; + char **args = data; + return avfilter_graph_send_command(vf->priv->graph, "all", + args[0], args[1], &(char){0}, 0, 0) + >= 0 ? CONTROL_OK : CONTROL_ERROR; + } case VFCTRL_GET_METADATA: if (vf->priv && vf->priv->metadata) { *(struct mp_tags *)data = *vf->priv->metadata; |