History

avfilter/af_aiir: check if frame clone is set

Paul B Mahol committed 6 years ago

Commit 80c4c331 parent 2a9a52b1 file · +6 −1Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_aiir.c+6−1
@@ -1037,8 +1037,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 1036 unmodified lines
10371037 int64_t new_pts = av_rescale_q(out->pts, ctx->inputs[0]->time_base, outlink->time_base);
10381038
10391039 if (new_pts > old_pts) {
1040+ AVFrame *clone;
1041+
10401042 s->video->pts = new_pts;
1041− ret = ff_filter_frame(outlink, av_frame_clone(s->video));
1043+ clone = av_frame_clone(s->video);
1044+ if (!clone)
1045+ return AVERROR(ENOMEM);
1046+ ret = ff_filter_frame(outlink, clone);
10421047 if (ret < 0)
10431048 return ret;
10441049 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t