summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_lavfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_lavfi.c')
-rw-r--r--video/filter/vf_lavfi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/filter/vf_lavfi.c b/video/filter/vf_lavfi.c
index a66bd2a971..6c18f829c4 100644
--- a/video/filter/vf_lavfi.c
+++ b/video/filter/vf_lavfi.c
@@ -298,6 +298,12 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *mpi)
if (!p->graph)
return -1;
+ if (!mpi) {
+ if (p->eof)
+ return 0;
+ p->eof = true;
+ }
+
AVFrame *frame = mp_to_av(vf, mpi);
int r = av_buffersrc_add_frame(p->in, frame) < 0 ? -1 : 0;
av_frame_free(&frame);