1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

use av_parse_video_frame_rate

Originally committed as revision 13537 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-05-29 17:24:22 +00:00
parent e8bd16a5e1
commit 369074680e

View File

@ -4054,8 +4054,14 @@ static int parse_ffconfig(const char *filename)
} else if (!strcasecmp(cmd, "VideoFrameRate")) { } else if (!strcasecmp(cmd, "VideoFrameRate")) {
get_arg(arg, sizeof(arg), &p); get_arg(arg, sizeof(arg), &p);
if (stream) { if (stream) {
video_enc.time_base.num= DEFAULT_FRAME_RATE_BASE; AVRational frame_rate;
video_enc.time_base.den = (int)(strtod(arg, NULL) * video_enc.time_base.num); 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")) { } else if (!strcasecmp(cmd, "VideoGopSize")) {
get_arg(arg, sizeof(arg), &p); get_arg(arg, sizeof(arg), &p);