mirror of https://github.com/mpv-player/mpv
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:
parent
dffb7c2409
commit
062d5eea3b
|
@ -175,8 +175,10 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *mpi)
|
||||||
struct vf_priv_s *p = vf->priv;
|
struct vf_priv_s *p = vf->priv;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (!p->out_node)
|
if (!p->out_node) {
|
||||||
|
talloc_free(mpi);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (!mpi)
|
if (!mpi)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue