summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-21 19:23:32 +0200
committerwm4 <wm4@nowhere>2013-07-21 23:27:30 +0200
commitc50d5376f214b8dc319206a2ce5a953ed04378f6 (patch)
treee35f221e3e80df27f146c5bbc929119816200144 /video
parent644451f4d9f3850eeea166f9eb534c652dc7ace4 (diff)
downloadmpv-c50d5376f214b8dc319206a2ce5a953ed04378f6.tar.bz2
mpv-c50d5376f214b8dc319206a2ce5a953ed04378f6.tar.xz
vf: remove unnecessary indirection
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf.c25
-rw-r--r--video/filter/vf.h6
2 files changed, 5 insertions, 26 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index eaa19bbdb8..c9fd80bceb 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -209,10 +209,8 @@ void vf_print_filter_chain(int msglevel, struct vf_instance *vf)
}
}
-struct vf_instance *vf_open_plugin_noerr(struct MPOpts *opts,
- const vf_info_t *const *filter_list,
- vf_instance_t *next, const char *name,
- char **args, int *retcode)
+static struct vf_instance *vf_open(struct MPOpts *opts, vf_instance_t *next,
+ const char *name, char **args)
{
vf_instance_t *vf;
int i;
@@ -247,26 +245,13 @@ struct vf_instance *vf_open_plugin_noerr(struct MPOpts *opts,
args = (char **)args[1];
else
args = NULL;
- *retcode = vf->info->vf_open(vf, (char *)args);
- if (*retcode > 0)
+ int retcode = vf->info->vf_open(vf, (char *)args);
+ if (retcode > 0)
return vf;
talloc_free(vf);
return NULL;
}
-struct vf_instance *vf_open_plugin(struct MPOpts *opts,
- const vf_info_t *const *filter_list,
- vf_instance_t *next, const char *name,
- char **args)
-{
- struct vf_instance *vf = vf_open_plugin_noerr(opts, filter_list, next,
- name, args, &(int){0});
- if (!vf)
- mp_tmsg(MSGT_VFILTER, MSGL_ERR, "Couldn't open video filter '%s'.\n",
- name);
- return vf;
-}
-
vf_instance_t *vf_open_filter(struct MPOpts *opts, vf_instance_t *next,
const char *name, char **args)
{
@@ -292,7 +277,7 @@ vf_instance_t *vf_open_filter(struct MPOpts *opts, vf_instance_t *next,
mp_msg(MSGT_VFILTER, MSGL_INFO, "%s[%s]\n",
mp_gtext("Opening video filter: "), name);
}
- return vf_open_plugin(opts, filter_list, next, name, args);
+ return vf_open(opts, next, name, args);
}
/**
diff --git a/video/filter/vf.h b/video/filter/vf.h
index be1243e3a4..b47f44a7ca 100644
--- a/video/filter/vf.h
+++ b/video/filter/vf.h
@@ -119,12 +119,6 @@ int vf_filter_frame(struct vf_instance *vf, struct mp_image *img);
struct mp_image *vf_chain_output_queued_frame(struct vf_instance *vf);
void vf_chain_seek_reset(struct vf_instance *vf);
-vf_instance_t *vf_open_plugin(struct MPOpts *opts,
- const vf_info_t * const *filter_list, vf_instance_t *next,
- const char *name, char **args);
-struct vf_instance *vf_open_plugin_noerr(struct MPOpts *opts,
- const vf_info_t *const *filter_list, vf_instance_t *next,
- const char *name, char **args, int *retcode);
vf_instance_t *vf_open_filter(struct MPOpts *opts, vf_instance_t *next,
const char *name, char **args);
vf_instance_t *vf_add_before_vo(vf_instance_t **vf, char *name, char **args);