[FFmpeg-devel] [PATCH 1/7] fftools/ffmpeg_filter: simplify control flow in read_frames
Marton Balint
cus at passwd.hu
Tue Jun 17 01:43:51 EEST 2025
No functional change.
Signed-off-by: Marton Balint <cus at passwd.hu>
---
fftools/ffmpeg_filter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index e0c40ffe00..a0dc4c745e 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -2672,7 +2672,7 @@ static int read_frames(FilterGraph *fg, FilterGraphThread *fgt,
ret = avfilter_graph_request_oldest(fgt->graph);
if (ret == AVERROR(EAGAIN)) {
fgt->next_in = choose_input(fg, fgt);
- break;
+ return 0;
} else if (ret < 0) {
if (ret == AVERROR_EOF)
av_log(fg, AV_LOG_VERBOSE, "Filtergraph returned EOF, finishing\n");
@@ -2702,7 +2702,7 @@ static int read_frames(FilterGraph *fg, FilterGraphThread *fgt,
did_step = 1;
}
- return (fgp->nb_outputs_done == fg->nb_outputs) ? AVERROR_EOF : 0;
+ return AVERROR_EOF;
}
static void sub2video_heartbeat(InputFilter *ifilter, int64_t pts, AVRational tb)
--
2.43.0
More information about the ffmpeg-devel
mailing list