From 369074680e765074a2725e637f6d58e2fc51749c Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Thu, 29 May 2008 17:24:22 +0000 Subject: use av_parse_video_frame_rate Originally committed as revision 13537 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffserver.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ffserver.c') diff --git a/ffserver.c b/ffserver.c index 5d5b6bf..705c557 100644 --- a/ffserver.c +++ b/ffserver.c @@ -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); -- cgit v1.1