From 7b404c94f38e8270ed704dd3d89a35f8f16f25b1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 10 Jul 2015 04:19:07 +0200 Subject: [PATCH] avcodec/libopenh264enc: Do not truncate frame rate Suggested-by: Gregory J Wolfe Signed-off-by: Michael Niedermayer --- libavcodec/libopenh264enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 2b7bad3a08..1d1342ac6c 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -92,7 +92,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) (*s->encoder)->GetDefaultParams(s->encoder, ¶m); - param.fMaxFrameRate = avctx->time_base.den / avctx->time_base.num; + param.fMaxFrameRate = 1/av_q2d(avctx->time_base); param.iPicWidth = avctx->width; param.iPicHeight = avctx->height; param.iTargetBitrate = avctx->bit_rate;