History

avfilter/vf_xfade: send EOF to first input early

No point to consume 1st input frames any more after crossfade is over.

Paul B Mahol committed 3 years ago

Commit c37cf591 parent 877ccaf1 file · +7 −3Browse files

Unified · Split

libavfilter/vf_xfade.c+7−3
@@ -2067,9 +2067,13 @@ static int xfade_activate(AVFilterContext *ctx) · 2066 unmodified lines
20672067
20682068 if (s->xfade_is_over) {
20692069 if (!s->eof[0]) {
2070− ret = ff_inlink_consume_frame(ctx->inputs[0], &in);
2071− if (ret > 0)
2072− av_frame_free(&in);
2070+ if (ff_inlink_queued_frames(ctx->inputs[0]) > 0) {
2071+ ret = ff_inlink_consume_frame(ctx->inputs[0], &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;
20732077 }
20742078 ret = ff_inlink_consume_frame(ctx->inputs[1], &in);
20752079 if (ret < 0) {

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