1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/f_ebur128: check if frame clone is set

This commit is contained in:
Paul B Mahol 2020-01-14 16:43:45 +01:00
parent c43f8baa41
commit cc752233fb

View File

@ -774,6 +774,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
/* push one video frame */ /* push one video frame */
if (ebur128->do_video) { if (ebur128->do_video) {
AVFrame *clone;
int x, y, ret; int x, y, ret;
uint8_t *p; uint8_t *p;
double gauge_value; double gauge_value;
@ -823,7 +824,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
/* set pts and push frame */ /* set pts and push frame */
pic->pts = pts; 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) if (ret < 0)
return ret; return ret;
} }