[FFmpeg-cvslog] avfilter/af_dcshift: do not leak out frame

Paul B Mahol git at videolan.org
Tue Sep 12 21:29:27 EEST 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Sep 12 20:26:44 2017 +0200| [04b9010f7f546dbe82e301fcb7fd3ea157d49155] | committer: Paul B Mahol

avfilter/af_dcshift: do not leak out frame

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavfilter/af_dcshift.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_dcshift.c b/libavfilter/af_dcshift.c
index 2ca2d07535..6d33daee0b 100644
--- a/libavfilter/af_dcshift.c
+++ b/libavfilter/af_dcshift.c
@@ -85,7 +85,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 {
     AVFilterContext *ctx = inlink->dst;
     AVFilterLink *outlink = ctx->outputs[0];
-    AVFrame *out = ff_get_audio_buffer(inlink, in->nb_samples);
+    AVFrame *out;
     DCShiftContext *s = ctx->priv;
     int i, j;
     double dcshift = s->dcshift;
@@ -93,7 +93,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     if (av_frame_is_writable(in)) {
         out = in;
     } else {
-        out = ff_get_audio_buffer(inlink, in->nb_samples);
+        out = ff_get_audio_buffer(outlink, in->nb_samples);
         if (!out) {
             av_frame_free(&in);
             return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list