ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Tue Jan 14 16:41:15 
2020 +0100| [c43f8baa41ee1db179db53664fe39324800ee076] | committer: Paul B Mahol

avfilter/avf_aphasemeter: check if clone frame is set

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

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

diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c
index f497bc9969..be0b2fb70f 100644
--- a/libavfilter/avf_aphasemeter.c
+++ b/libavfilter/avf_aphasemeter.c
@@ -213,8 +213,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     }
 
     if (s->do_video) {
+        AVFrame *clone;
+
         s->out->pts = in->pts;
-        ff_filter_frame(outlink, av_frame_clone(s->out));
+        clone = av_frame_clone(s->out);
+        if (!clone)
+            return AVERROR(ENOMEM);
+        ff_filter_frame(outlink, clone);
     }
     return ff_filter_frame(aoutlink, in);
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to