diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-01-14 16:43:45 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-01-14 16:52:08 +0100 |
commit | cc752233fb83df53c55fc9b3d12b9ffc6df124d9 (patch) | |
tree | 499bb1b386b5435375d6313e867d1e94060df8c6 | |
parent | c43f8baa41ee1db179db53664fe39324800ee076 (diff) | |
download | ffmpeg-cc752233fb83df53c55fc9b3d12b9ffc6df124d9.tar.gz |
avfilter/f_ebur128: check if frame clone is set
-rw-r--r-- | libavfilter/f_ebur128.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |