avconv: when using -loop option bail out if seek to start fails
authorPeter Große <pegro@friiks.de>
Fri, 30 Jun 2017 15:28:53 +0000 (17:28 +0200)
committerAnton Khirnov <anton@khirnov.net>
Fri, 28 Jul 2017 11:13:44 +0000 (13:13 +0200)
Fixes an infinite loop when a demuxer fails to seek to the start of the input.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
avtools/avconv.c

index 8dd11bb..4e3ffec 100644 (file)
@@ -2615,9 +2615,11 @@ static int process_input(void)
         return ret;
     }
     if (ret < 0 && ifile->loop) {
-        if ((ret = seek_to_start(ifile, is)) < 0)
-            return ret;
-        ret = get_input_packet(ifile, &pkt);
+        ret = seek_to_start(ifile, is);
+        if(ret < 0)
+            av_log(NULL, AV_LOG_WARNING, "Seek to start failed.\n");
+        else
+            ret = get_input_packet(ifile, &pkt);
     }
     if (ret < 0) {
         if (ret != AVERROR_EOF) {