No point to consume 1st input frames any more after crossfade is over.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -2067,9 +2067,13 @@ static int xfade_activate(AVFilterContext *ctx) · 2066 unmodified lines | |||
| 2067 | 2067 | ||
| 2068 | if (s->xfade_is_over) { | 2068 | if (s->xfade_is_over) { |
| 2069 | if (!s->eof[0]) { | 2069 | if (!s->eof[0]) { |
| 2070 | ret = ff_inlink_consume_frame(ctx->inputs[0], &in); | 2070 | if (ff_inlink_queued_frames(ctx->inputs[0]) > 0) { |
| 2071 | if (ret > 0) | 2071 | ret = ff_inlink_consume_frame(ctx->inputs[0], &in); |
| 2072 | av_frame_free(&in); | 2072 | if (ret > 0) |
| 2073 | av_frame_free(&in); | ||
| 2074 | } | ||
| 2075 | ff_inlink_set_status(ctx->inputs[0], AVERROR_EOF); | ||
| 2076 | s->eof[0] = 1; | ||
| 2073 | } | 2077 | } |
| 2074 | ret = ff_inlink_consume_frame(ctx->inputs[1], &in); | 2078 | ret = ff_inlink_consume_frame(ctx->inputs[1], &in); |
| 2075 | if (ret < 0) { | 2079 | if (ret < 0) { |