[FFmpeg-cvslog] avfilter/f_ebur128: check if frame clone is set
Paul B Mahol
git at videolan.org
Tue Jan 14 17:57:25 EET 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Jan 14 16:43:45 2020 +0100| [cc752233fb83df53c55fc9b3d12b9ffc6df124d9] | committer: Paul B Mahol
avfilter/f_ebur128: check if frame clone is set
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc752233fb83df53c55fc9b3d12b9ffc6df124d9
---
libavfilter/f_ebur128.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index f25d5f096e..31b75ab097 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -774,6 +774,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
/* push one video frame */
if (ebur128->do_video) {
+ AVFrame *clone;
int x, y, ret;
uint8_t *p;
double gauge_value;
@@ -823,7 +824,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
/* set pts and push frame */
pic->pts = pts;
- ret = ff_filter_frame(outlink, av_frame_clone(pic));
+ clone = av_frame_clone(pic);
+ if (!clone)
+ return AVERROR(ENOMEM);
+ ret = ff_filter_frame(outlink, clone);
if (ret < 0)
return ret;
}
More information about the ffmpeg-cvslog
mailing list