diff options
Diffstat (limited to 'audio/filter/af_lavfi.c')
-rw-r--r-- | audio/filter/af_lavfi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/audio/filter/af_lavfi.c b/audio/filter/af_lavfi.c index bc4a687487..55fb7cb0dc 100644 --- a/audio/filter/af_lavfi.c +++ b/audio/filter/af_lavfi.c @@ -246,7 +246,7 @@ static int control(struct af_instance *af, int cmd, void *arg) static void get_metadata_from_av_frame(struct af_instance *af, AVFrame *frame) { -#if HAVE_AVFRAME_METADATA +#if LIBAVUTIL_VERSION_MICRO >= 100 struct priv *p = af->priv; if (!p->metadata) p->metadata = talloc_zero(p, struct mp_tags); @@ -266,6 +266,12 @@ static int filter_frame(struct af_instance *af, struct mp_audio *data) if (!p->graph) goto error; + if (!data) { + if (p->eof) + return 0; + p->eof = true; + } + if (data) { frame = mp_audio_to_avframe_and_unref(data); data = NULL; |