Unified · Split
| @@ -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 | ||
| 366 | static int activate(AVFilterContext *ctx) | 371 | static int activate(AVFilterContext *ctx) |