Unified · Split
| @@ -163,6 +163,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 162 unmodified lines | |||
| 163 | const int w = s->w; | 163 | const int w = s->w; |
| 164 | int c, y, n, p, bin; | 164 | int c, y, n, p, bin; |
| 165 | uint64_t acmax = 1; | 165 | uint64_t acmax = 1; |
| 166 | AVFrame *clone; | ||
| 166 | 167 | ||
| 167 | if (!s->out || s->out->width != outlink->w || | 168 | if (!s->out || s->out->width != outlink->w || |
| 168 | s->out->height != outlink->h) { | 169 | s->out->height != outlink->h) { |
| @@ -363,7 +364,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 194 unmodified lines | |||
| 363 | s->ypos = H; | 364 | s->ypos = H; |
| 364 | } | 365 | } |
| 365 | 366 | ||
| 366 | return ff_filter_frame(outlink, av_frame_clone(s->out)); | 367 | clone = av_frame_clone(s->out); |
| 368 | if (!clone) | ||
| 369 | return AVERROR(ENOMEM); | ||
| 370 | |||
| 371 | return ff_filter_frame(outlink, clone); | ||
| 367 | } | 372 | } |
| 368 | 373 | ||
| 369 | static int activate(AVFilterContext *ctx) | 374 | static int activate(AVFilterContext *ctx) |