ffmpeg: fix -stream_loop with -re
authorMarton Balint <cus@passwd.hu>
Thu, 30 Jun 2016 23:12:25 +0000 (01:12 +0200)
committerMarton Balint <cus@passwd.hu>
Sun, 28 Aug 2016 16:22:24 +0000 (18:22 +0200)
Otherwise the stream failed with EAGAIN.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
ffmpeg.c

index bad311d..3229823 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3801,6 +3801,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) {