[FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_filter: do not end filtering when a graph input EOFs

Anton Khirnov anton at khirnov.net
Wed Jan 24 12:46:21 EET 2024


There may be other inputs or sources in the filtergraph. Propagate the
EOF to the scheduler and continue filtering.

Fixes #10803
---
 fftools/ffmpeg_filter.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 82ee4fae7d..ab64b4610a 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -2871,6 +2871,12 @@ static void *filter_thread(void *arg)
             ret = send_eof(&fgt, ifilter, fgt.frame->pts, fgt.frame->time_base);
         }
         av_frame_unref(fgt.frame);
+        if (ret == AVERROR_EOF) {
+            av_log(fg, AV_LOG_VERBOSE, "Input %u no longer accepts new data\n",
+                   input_idx);
+            sch_filter_receive_finish(fgp->sch, fgp->sch_idx, input_idx);
+            continue;
+        }
         if (ret < 0)
             goto finish;
 
-- 
2.42.0



More information about the ffmpeg-devel mailing list