Commit 669580a8 authored by philipjsg's avatar philipjsg

* Extend the syntax of a filename for the img reader to allow looping. Thus

  %125*d means substitute the frame number MOD 125 into the filename. This
  is a cheap method of having an infinite stream.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1332 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8cb1d908
......@@ -1089,11 +1089,20 @@ int get_frame_filename(char *buf, int buf_size,
if (c == '\0')
break;
if (c == '%') {
nd = 0;
while (*p >= '0' && *p <= '9') {
nd = nd * 10 + *p++ - '0';
}
c = *p++;
do {
nd = 0;
while (isdigit(*p)) {
nd = nd * 10 + *p++ - '0';
}
c = *p++;
if (c == '*' && nd > 0) {
// The nd field is actually the modulus
number = number % nd;
c = *p++;
nd = 0;
}
} while (isdigit(c));
switch(c) {
case '%':
goto addchar;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment