Browse Source

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@friiks.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n4.0
Peter Große Anton Khirnov 8 years ago
parent
commit
a58873b111
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      avtools/avconv.c

+ 5
- 3
avtools/avconv.c View 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) {


Loading…
Cancel
Save