[FFmpeg-cvslog] avfilter/af_anequalizer: check if frame clone is set

Paul B Mahol git at videolan.org
Tue Jan 14 17:57:16 EET 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Jan 14 16:14:46 2020 +0100| [f6f6857c2a81a29c19993195c2cef7e15eda601c] | committer: Paul B Mahol

avfilter/af_anequalizer: check if frame clone is set

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

 libavfilter/af_anequalizer.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c
index ee82474083..c974fd5abc 100644
--- a/libavfilter/af_anequalizer.c
+++ b/libavfilter/af_anequalizer.c
@@ -733,13 +733,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
     }
 
     if (s->draw_curves) {
+        AVFrame *clone;
+
         const int64_t pts = buf->pts +
             av_rescale_q(buf->nb_samples, (AVRational){ 1, inlink->sample_rate },
                          outlink->time_base);
         int ret;
 
         s->video->pts = pts;
-        ret = ff_filter_frame(ctx->outputs[1], av_frame_clone(s->video));
+        clone = av_frame_clone(s->video);
+        if (!clone)
+            return AVERROR(ENOMEM);
+        ret = ff_filter_frame(ctx->outputs[1], clone);
         if (ret < 0)
             return ret;
     }



More information about the ffmpeg-cvslog mailing list