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
238 AudioVectorScopeContext *s = ctx->priv;238 AudioVectorScopeContext *s = ctx->priv;
239 const int hw = s->hw;239 const int hw = s->hw;
240 const int hh = s->hh;240 const int hh = s->hh;
241 AVFrame *clone;
241 unsigned x, y;242 unsigned x, y;
242 unsigned prev_x = s->prev_x, prev_y = s->prev_y;243 unsigned prev_x = s->prev_x, prev_y = s->prev_y;
243 double zoom = s->zoom;244 double zoom = s->zoom;
@@ -360,7 +361,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 116 unmodified lines
360 s->prev_x = x, s->prev_y = y;361 s->prev_x = x, s->prev_y = y;
361 av_frame_free(&insamples);362 av_frame_free(&insamples);
362 363
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);
364}369}
365 370
366static int activate(AVFilterContext *ctx)371static 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