Commit 36907468 authored by Baptiste Coudurier's avatar Baptiste Coudurier

use av_parse_video_frame_rate

Originally committed as revision 13537 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e8bd16a5
......@@ -4054,8 +4054,14 @@ static int parse_ffconfig(const char *filename)
} else if (!strcasecmp(cmd, "VideoFrameRate")) {
get_arg(arg, sizeof(arg), &p);
if (stream) {
video_enc.time_base.num= DEFAULT_FRAME_RATE_BASE;
video_enc.time_base.den = (int)(strtod(arg, NULL) * video_enc.time_base.num);
AVRational frame_rate;
if (av_parse_video_frame_rate(&frame_rate, arg) < 0) {
fprintf(stderr, "Incorrect frame rate\n");
errors++;
} else {
video_enc.time_base.num = frame_rate.den;
video_enc.time_base.den = frame_rate.num;
}
}
} else if (!strcasecmp(cmd, "VideoGopSize")) {
get_arg(arg, sizeof(arg), &p);
......
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