[FFmpeg-devel] [PATCH 1/2] ffmpeg: fix -stream_loop with -re

Marton Balint cus at passwd.hu
Sun Jul 3 01:33:31 EEST 2016


Otherwise the stream failed with EAGAIN.

Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffmpeg.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index 9ffd833..f06fee5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3805,6 +3805,10 @@ static int process_input(int file_index)
         if ((ret = seek_to_start(ifile, is)) < 0)
             return ret;
         ret = get_input_packet(ifile, &pkt);
+        if (ret == AVERROR(EAGAIN)) {
+            ifile->eagain = 1;
+            return ret;
+        }
     }
     if (ret < 0) {
         if (ret != AVERROR_EOF) {
-- 
2.6.6



More information about the ffmpeg-devel mailing list