avfilter/vf_libplacebo: also output a frame during input gaps

In constant FPS mode, it's possible for there no be *no* input active at
the current timestamp, even though there would be active inputs later in
the timeline (nb_active > 0). This would previously hit the AVERROR_BUG case.

With this change, we can instead output an empty frame.
This commit is contained in:
Niklas Haas
2025-08-12 12:20:11 +02:00
committed by Niklas Haas
parent 68c083c43f
commit ef856ef93e

View File

@@ -1243,6 +1243,10 @@ static int libplacebo_activate(AVFilterContext *ctx)
}
}
/* In constant FPS mode, we can also output an empty frame if there is
* a gap in the input timeline and we still have active streams */
ok |= s->fps.num && s->nb_active > 0;
if (retry) {
return 0;
} else if (ok) {