aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-05-29 17:24:22 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-05-29 17:24:22 +0000
commit369074680e765074a2725e637f6d58e2fc51749c (patch)
tree8b03ce9147a1c4274217fe7b0d4b2f21f8c8e426
parente8bd16a5e1d0df6cfe5900621a453a74c6540f46 (diff)
downloadffmpeg-369074680e765074a2725e637f6d58e2fc51749c.tar.gz
use av_parse_video_frame_rate
Originally committed as revision 13537 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffserver.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c
index 5d5b6bfe9f..705c557352 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);