aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-29 14:21:41 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-29 14:21:41 +0100
commit9f7de9951790ca86321dccd9705e463f5310958b (patch)
tree6acf2534a5fdbfdcdbf6e18d38fbca9a9790f6ee /ffmpeg.c
parent3ec049b85dacdb5e3f598e4ddab87b1d5a877783 (diff)
parentcd0e08813a0484002b5defbf557c859f123953ae (diff)
downloadffmpeg-9f7de9951790ca86321dccd9705e463f5310958b.tar.gz
Merge commit 'cd0e08813a0484002b5defbf557c859f123953ae'
* commit 'cd0e08813a0484002b5defbf557c859f123953ae': avconv: support infinite loop for the loop option Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index f91fb7b7d4..afe1cb71fe 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3698,7 +3698,8 @@ static int seek_to_start(InputFile *ifile, AVFormatContext *is)
ifile->time_base);
}
- ifile->loop--;
+ if (ifile->loop > 0)
+ ifile->loop--;
return ret;
}
@@ -3726,7 +3727,7 @@ static int process_input(int file_index)
ifile->eagain = 1;
return ret;
}
- if ((ret < 0) && (ifile->loop > 1)) {
+ if (ret < 0 && ifile->loop) {
if ((ret = seek_to_start(ifile, is)) < 0)
return ret;
ret = get_input_packet(ifile, &pkt);