From f3c35d8108e4eb7ee3f0a0291d4217914424213d Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 2 Aug 2016 21:49:00 +0200 Subject: af_lavcac3enc: skip output if there was no input frame Unrealistic corner case: drainning was initiated right after a seek. --- audio/filter/af_lavcac3enc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'audio') diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c index d0fdab0b08..575ad03449 100644 --- a/audio/filter/af_lavcac3enc.c +++ b/audio/filter/af_lavcac3enc.c @@ -265,6 +265,9 @@ static int filter_out(struct af_instance *af) { af_ac3enc_t *s = af->priv; + if (!s->pending) + return 0; + AVFrame *frame = av_frame_alloc(); if (!frame) { MP_FATAL(af, "Could not allocate memory \n"); -- cgit v1.2.3