Commit 2a9a52b9 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_afir: check if frame clone is set

parent f9897eda
......@@ -670,8 +670,12 @@ static int activate(AVFilterContext *ctx)
int64_t new_pts = av_rescale_q(s->pts, ctx->inputs[0]->time_base, ctx->outputs[1]->time_base);
if (ff_outlink_frame_wanted(ctx->outputs[1]) && old_pts < new_pts) {
AVFrame *clone;
s->video->pts = new_pts;
return ff_filter_frame(ctx->outputs[1], av_frame_clone(s->video));
clone = av_frame_clone(s->video);
if (!clone)
return AVERROR(ENOMEM);
return ff_filter_frame(ctx->outputs[1], clone);
}
}
......
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