summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-02 21:49:00 +0200
committerwm4 <wm4@nowhere>2016-08-02 22:06:22 +0200
commitf3c35d8108e4eb7ee3f0a0291d4217914424213d (patch)
tree86dd8a44b33c29463dd6b62bc6852e01bd0f0d80 /audio
parentdea738a245855d93bb21c366747f494f6513a299 (diff)
downloadmpv-f3c35d8108e4eb7ee3f0a0291d4217914424213d.tar.bz2
mpv-f3c35d8108e4eb7ee3f0a0291d4217914424213d.tar.xz
af_lavcac3enc: skip output if there was no input frame
Unrealistic corner case: drainning was initiated right after a seek.
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af_lavcac3enc.c3
1 files changed, 3 insertions, 0 deletions
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");