Commit 03ef726e authored by Jan Gerber's avatar Jan Gerber
Browse files

parse float framerates

parent 216203de
......@@ -1693,8 +1693,16 @@ AVRational get_framerate(const char* arg)
if (framerate.den <= 0)
framerate.den = 1;
} else {
framerate.num = strtol(arg, (char **)&arg,10);
framerate.den = 1;
p = strchr(arg, '.');
if (!p) {
framerate.num = strtol(arg, (char **)&arg, 10);
framerate.den = 1;
} else {
av_reduce(&framerate.num, &framerate.den,
strtod(arg, (char **)&arg) * 10000,
10000,
1024*1024);
}
}
return(framerate);
}
......
Supports Markdown
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