Commit c43f8baa authored by Paul B Mahol's avatar Paul B Mahol

avfilter/avf_aphasemeter: check if clone frame is set

parent d580c7a7
...@@ -213,8 +213,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) ...@@ -213,8 +213,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
} }
if (s->do_video) { if (s->do_video) {
AVFrame *clone;
s->out->pts = in->pts; 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); return ff_filter_frame(aoutlink, in);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment