summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-13 12:29:40 +0200
committerwm4 <wm4@nowhere>2014-04-13 12:29:40 +0200
commit8161f4374ca2723af6a0fad7a4bf137daede3d28 (patch)
treeafcc55f184a02af347afb04daf2ab0ecbab494ea /video
parentf3043a77a3def61bff5ed49350190f90298614bb (diff)
downloadmpv-8161f4374ca2723af6a0fad7a4bf137daede3d28.tar.bz2
mpv-8161f4374ca2723af6a0fad7a4bf137daede3d28.tar.xz
vf_vapoursynth: error out early if the file sub-option is not set
Instead of crashing by possibly passing a NULL pointer to VapourSynth.
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_vapoursynth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c
index 7b7530c4fe..58bc829c7f 100644
--- a/video/filter/vf_vapoursynth.c
+++ b/video/filter/vf_vapoursynth.c
@@ -443,6 +443,10 @@ static int vf_open(vf_instance_t *vf)
vf->control = control;
vf->uninit = uninit;
p->buffered = talloc_array(vf, struct mp_image *, p->cfg_maxbuffer);
+ if (!p->cfg_file || !p->cfg_file[0]) {
+ MP_FATAL(vf, "'file' parameter must be set.\n");
+ goto error;
+ }
if (!vsscript_init())
goto error;
p->vs_initialized = true;