aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-10-21 12:03:58 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-10-26 19:28:24 +0100
commitcd0e08813a0484002b5defbf557c859f123953ae (patch)
tree34f6328638dde00f8924febad81f9321cbe2e002 /avconv.c
parenta9a60106370f862e191dea58e748626da6a8fe97 (diff)
downloadffmpeg-cd0e08813a0484002b5defbf557c859f123953ae.tar.gz
avconv: support infinite loop for the loop option
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/avconv.c b/avconv.c
index ed0a3dd84f..493f9d2507 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2329,7 +2329,8 @@ static int seek_to_start(InputFile *ifile, AVFormatContext *is)
ifile->time_base);
}
- ifile->loop--;
+ if (ifile->loop > 0)
+ ifile->loop--;
return ret;
}
@@ -2375,7 +2376,7 @@ static int process_input(void)
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);