mirror of https://github.com/mpv-player/mpv
vf_vapoursynth: print more diagnostics on error
This commit is contained in:
parent
bead9766bc
commit
beceb2fedc
|
@ -455,8 +455,10 @@ static int reinit_vs(struct vf_instance *vf)
|
||||||
goto error;
|
goto error;
|
||||||
p->vsapi = vsscript_getVSApi();
|
p->vsapi = vsscript_getVSApi();
|
||||||
p->vscore = vsscript_getCore(p->se);
|
p->vscore = vsscript_getCore(p->se);
|
||||||
if (!p->vsapi || !p->vscore)
|
if (!p->vsapi || !p->vscore) {
|
||||||
|
MP_FATAL(vf, "Could not get vapoursynth API handle.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
in = p->vsapi->createMap();
|
in = p->vsapi->createMap();
|
||||||
out = p->vsapi->createMap();
|
out = p->vsapi->createMap();
|
||||||
|
@ -468,8 +470,10 @@ static int reinit_vs(struct vf_instance *vf)
|
||||||
infiltFree, fmSerial, 0, vf, p->vscore);
|
infiltFree, fmSerial, 0, vf, p->vscore);
|
||||||
int vserr;
|
int vserr;
|
||||||
p->in_node = p->vsapi->propGetNode(out, "clip", 0, &vserr);
|
p->in_node = p->vsapi->propGetNode(out, "clip", 0, &vserr);
|
||||||
if (!p->in_node)
|
if (!p->in_node) {
|
||||||
|
MP_FATAL(vf, "Could not get our own input node.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (p->vsapi->propSetNode(vars, "video_in", p->in_node, 0))
|
if (p->vsapi->propSetNode(vars, "video_in", p->in_node, 0))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -481,8 +485,10 @@ static int reinit_vs(struct vf_instance *vf)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
p->out_node = vsscript_getOutput(p->se, 0);
|
p->out_node = vsscript_getOutput(p->se, 0);
|
||||||
if (!p->out_node)
|
if (!p->out_node) {
|
||||||
|
MP_FATAL(vf, "Could not get script output node.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
const VSVideoInfo *vi = p->vsapi->getVideoInfo(p->out_node);
|
const VSVideoInfo *vi = p->vsapi->getVideoInfo(p->out_node);
|
||||||
if (!isConstantFormat(vi)) {
|
if (!isConstantFormat(vi)) {
|
||||||
|
|
Loading…
Reference in New Issue