mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/af_aiir: check if frame clone is set
This commit is contained in:
parent
2a9a52b913
commit
80c4c336f9
|
@ -1037,8 +1037,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||||
int64_t new_pts = av_rescale_q(out->pts, ctx->inputs[0]->time_base, outlink->time_base);
|
int64_t new_pts = av_rescale_q(out->pts, ctx->inputs[0]->time_base, outlink->time_base);
|
||||||
|
|
||||||
if (new_pts > old_pts) {
|
if (new_pts > old_pts) {
|
||||||
|
AVFrame *clone;
|
||||||
|
|
||||||
s->video->pts = new_pts;
|
s->video->pts = new_pts;
|
||||||
ret = ff_filter_frame(outlink, av_frame_clone(s->video));
|
clone = av_frame_clone(s->video);
|
||||||
|
if (!clone)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
ret = ff_filter_frame(outlink, clone);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue