History

avfilter/avf_avectorscope: check if clone frame is set

Paul B Mahol committed 6 years ago

Commit f9897ed1 parent 4e1ae431 file · +6 −1Browse files

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

Unified · Split

libavfilter/avf_avectorscope.c+6−1
@@ -238,6 +238,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 237 unmodified lines
238238 AudioVectorScopeContext *s = ctx->priv;
239239 const int hw = s->hw;
240240 const int hh = s->hh;
241+ AVFrame *clone;
241242 unsigned x, y;
242243 unsigned prev_x = s->prev_x, prev_y = s->prev_y;
243244 double zoom = s->zoom;
@@ -360,7 +361,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 116 unmodified lines
360361 s->prev_x = x, s->prev_y = y;
361362 av_frame_free(&insamples);
362363
363− return ff_filter_frame(outlink, av_frame_clone(s->outpicref));
364+ clone = av_frame_clone(s->outpicref);
365+ if (!clone)
366+ return AVERROR(ENOMEM);
367+
368+ return ff_filter_frame(outlink, clone);
364369 }
365370
366371 static int activate(AVFilterContext *ctx)

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