[FFmpeg-devel] [PATCH] fftools/ffmpeg: do not fail on AVERROR(EAGAIN) from choose_output()

Anton Khirnov anton at khirnov.net
Tue Sep 5 20:19:50 EEST 2023


This is not an error condition, but would be treated like one if the
program terminates on the next transcode loop iteration because of a
signal or keyboard input.

Fixes #10504
Tested-by: https://github.com/0Ky
---
 fftools/ffmpeg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index f1c5f40caf..fd2ce1c2d0 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1196,6 +1196,7 @@ static int transcode(int *err_rate_exceeded)
         if (ret == AVERROR(EAGAIN)) {
             reset_eagain();
             av_usleep(10000);
+            ret = 0;
             continue;
         } else if (ret < 0) {
             av_log(NULL, AV_LOG_VERBOSE, "No more output streams to write to, finishing.\n");
-- 
2.40.1



More information about the ffmpeg-devel mailing list