You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avconv: support infinite loop for the loop option
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
committed by
Luca Barbato
parent
a9a6010637
commit
cd0e08813a
3
avconv.c
3
avconv.c
@@ -2329,6 +2329,7 @@ static int seek_to_start(InputFile *ifile, AVFormatContext *is)
|
|||||||
ifile->time_base);
|
ifile->time_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ifile->loop > 0)
|
||||||
ifile->loop--;
|
ifile->loop--;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -2375,7 +2376,7 @@ static int process_input(void)
|
|||||||
ifile->eagain = 1;
|
ifile->eagain = 1;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if ((ret < 0) && (ifile->loop > 1)) {
|
if (ret < 0 && ifile->loop) {
|
||||||
if ((ret = seek_to_start(ifile, is)) < 0)
|
if ((ret = seek_to_start(ifile, is)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
ret = get_input_packet(ifile, &pkt);
|
ret = get_input_packet(ifile, &pkt);
|
||||||
|
@@ -254,7 +254,8 @@ Overwrite output files without asking.
|
|||||||
Immediately exit when output files already exist.
|
Immediately exit when output files already exist.
|
||||||
|
|
||||||
@item -loop @var{number} (@emph{input})
|
@item -loop @var{number} (@emph{input})
|
||||||
Set number of times input stream shall be looped.
|
Set number of times input stream shall be looped. Loop 0 means no loop,
|
||||||
|
loop -1 means infinite loop.
|
||||||
|
|
||||||
@item -c[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
@item -c[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
||||||
@itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
@itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
||||||
|
Reference in New Issue
Block a user