vf_vapoursynth: fix memory leak on error

Since this leaks video images, and the player keeps feeding new images
to the fitler even if it fails, this would probably have disastrous
consequences.
This commit is contained in:
wm4 2014-04-28 21:45:36 +02:00
parent dffb7c2409
commit 062d5eea3b
1 changed files with 3 additions and 1 deletions

View File

@ -175,8 +175,10 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *mpi)
struct vf_priv_s *p = vf->priv;
int ret = 0;
if (!p->out_node)
if (!p->out_node) {
talloc_free(mpi);
return -1;
}
if (!mpi)
return 0;