Commit a58873b1 authored by Peter Große's avatar Peter Große Committed by 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: 's avatarPeter Große <pegro@friiks.de>
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 004ea637
...@@ -2615,9 +2615,11 @@ static int process_input(void) ...@@ -2615,9 +2615,11 @@ static int process_input(void)
return ret; return ret;
} }
if (ret < 0 && ifile->loop) { if (ret < 0 && ifile->loop) {
if ((ret = seek_to_start(ifile, is)) < 0) ret = seek_to_start(ifile, is);
return ret; if(ret < 0)
ret = get_input_packet(ifile, &pkt); av_log(NULL, AV_LOG_WARNING, "Seek to start failed.\n");
else
ret = get_input_packet(ifile, &pkt);
} }
if (ret < 0) { if (ret < 0) {
if (ret != AVERROR_EOF) { if (ret != AVERROR_EOF) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment