Fixes #8253
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -420,7 +420,10 @@ static int request_frame(AVFilterLink *outlink) · 419 unmodified lines | |||
| 420 | 420 | ||
| 421 | ret = ff_request_frame(ctx->inputs[0]); | 421 | ret = ff_request_frame(ctx->inputs[0]); |
| 422 | if (ret == AVERROR_EOF && s->available > 0) { | 422 | if (ret == AVERROR_EOF && s->available > 0) { |
| 423 | AVFrame *buf = av_frame_clone(ff_bufqueue_peek(&s->q, s->size - 1)); | 423 | AVFrame *buf = ff_bufqueue_peek(&s->q, s->available - 1); |
| 424 | if (!buf) | ||
| 425 | return AVERROR(ENOMEM); | ||
| 426 | buf = av_frame_clone(buf); | ||
| 424 | if (!buf) | 427 | if (!buf) |
| 425 | return AVERROR(ENOMEM); | 428 | return AVERROR(ENOMEM); |
| 426 | 429 | ||