summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-30 14:04:53 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:09 +0900
commit74a3d29f21d9faf290ba0fd6e86abb9682c0ac17 (patch)
tree1ae1e11c1b1eb594ab538565c5c0e5dbdc93d5d4 /video
parent07acf5cb9aceb028043ccb25ce89b6ad22713259 (diff)
downloadmpv-74a3d29f21d9faf290ba0fd6e86abb9682c0ac17.tar.bz2
mpv-74a3d29f21d9faf290ba0fd6e86abb9682c0ac17.tar.xz
command: make empty vf-metadata not an error
If a filter exists, but has no metadata, just return success. This allows the user to distinguish between no metadata available, and filter not inserted. See #1408.
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index 7a5b08bcd9..6a7c98aef2 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -174,10 +174,11 @@ 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 && cur->control)
- return cur->control(cur, cmd, arg);
- else
+ if (cur) {
+ return cur->control ? cur->control(cur, cmd, arg) : CONTROL_NA;
+ } else {
return CONTROL_UNKNOWN;
+ }
}
static void vf_control_all(struct vf_chain *c, int cmd, void *arg)