diff options
author | Niklas Haas <[email protected]> | 2025-08-12 12:20:11 +0200 |
---|---|---|
committer | Niklas Haas <[email protected]> | 2025-09-02 09:55:31 +0000 |
commit | ef856ef93ef6c449f546c10f86c820d4dafe2fdc (patch) | |
tree | 9451a9ddb132b9f2f856670ada1d9cd8f0d8a27b | |
parent | 68c083c43ff7a87619e15f13205ad45767b9fb53 (diff) |
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.
-rw-r--r-- | libavfilter/vf_libplacebo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index e3761bead8..2e7e83e8db 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -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) { |