[FFmpeg-cvslog] avconv: when using -loop option bail out if seek to start fails
Peter Große
git at videolan.org
Sat Nov 11 02:08:00 EET 2017
ffmpeg | branch: master | Peter Große <pegro at friiks.de> | Fri Jun 30 17:28:53 2017 +0200| [a58873b11198d04670b7f98f5a8a749d742db7c5] | committer: Anton Khirnov
avconv: when using -loop option bail out if seek to start fails
Fixes an infinite loop when a demuxer fails to seek to the start of the input.
Signed-off-by: Peter Große <pegro at friiks.de>
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a58873b11198d04670b7f98f5a8a749d742db7c5
---
avtools/avconv.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/avtools/avconv.c b/avtools/avconv.c
index 8dd11bb5fc..4e3ffecdef 100644
--- a/avtools/avconv.c
+++ b/avtools/avconv.c
@@ -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) {
More information about the ffmpeg-cvslog
mailing list