[FFmpeg-cvslog] avfilter/af_dynaudnorm: do not enqueue flush buffers

Paul B Mahol git at videolan.org
Thu Jan 2 17:29:57 EET 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Jan  2 16:22:47 2020 +0100| [ed02563ce0c3df823e96af1178bc566cb7eaac60] | committer: Paul B Mahol

avfilter/af_dynaudnorm: do not enqueue flush buffers

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed02563ce0c3df823e96af1178bc566cb7eaac60
---

 libavfilter/af_dynaudnorm.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
index 2283fafb14..e170a5b2e5 100644
--- a/libavfilter/af_dynaudnorm.c
+++ b/libavfilter/af_dynaudnorm.c
@@ -686,10 +686,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
         ret = ff_filter_frame(outlink, out);
     }
 
-    av_frame_make_writable(in);
-    cqueue_enqueue(s->is_enabled, !ctx->is_disabled);
-    analyze_frame(s, in);
-    ff_bufqueue_add(ctx, &s->queue, in);
+    if (!s->eof) {
+        av_frame_make_writable(in);
+        cqueue_enqueue(s->is_enabled, !ctx->is_disabled);
+        analyze_frame(s, in);
+        ff_bufqueue_add(ctx, &s->queue, in);
+    } else {
+        av_frame_free(&in);
+    }
 
     return ret;
 }



More information about the ffmpeg-cvslog mailing list