From ce178be8b0caf3255ceeeff14a8c3619dac5cc8a Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 7 Mar 2024 15:21:30 +0100 Subject: fftools/ffmpeg_filter: do not assume av_buffersrc_get_nb_failed_requests()>0 Apparently it can happen that avfilter_graph_request_oldest() returns EAGAIN, yet av_buffersrc_get_nb_failed_requests() returns 0 for every input. Works around #10795, though the root issue is most likely in the scale2ref filter. --- fftools/ffmpeg_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fftools') diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 960393b943..65574809bf 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -1889,7 +1889,7 @@ static void send_command(FilterGraph *fg, AVFilterGraph *graph, static int choose_input(const FilterGraph *fg, const FilterGraphThread *fgt) { - int nb_requests, nb_requests_max = 0; + int nb_requests, nb_requests_max = -1; int best_input = -1; for (int i = 0; i < fg->nb_inputs; i++) { -- cgit v1.2.3