Browse Source

Merge commit 'cd0e08813a0484002b5defbf557c859f123953ae'

* commit 'cd0e08813a0484002b5defbf557c859f123953ae':
  avconv: support infinite loop for the loop option

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
tags/n3.0
Hendrik Leppkes 10 years ago
parent
commit
9f7de99517
2 changed files with 5 additions and 3 deletions
  1. +2
    -1
      doc/ffmpeg.texi
  2. +3
    -2
      ffmpeg.c

+ 2
- 1
doc/ffmpeg.texi View File

@@ -254,7 +254,8 @@ Do not overwrite output files, and exit immediately if a specified
output file already exists.

@item -stream_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})
@itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})


+ 3
- 2
ffmpeg.c View File

@@ -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);


Loading…
Cancel
Save