From 472d488ebcc53bea4cdb124edb94558e72d8f23f Mon Sep 17 00:00:00 2001 From: Arttu Ylä-Outinen Date: Fri, 15 Jan 2016 15:53:46 +0200 Subject: libkvazaar: Set frame rate as a rational number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates libkvazaar to pass the exact frame rate to Kvazaar by setting the numerator and denominator separately instead of a single floating point number. The exact frame rate is needed for writing timing info to the bitstream. Requires Kvazaar version 0.8.1. Signed-off-by: Arttu Ylä-Outinen Signed-off-by: Luca Barbato --- libavcodec/libkvazaar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/libkvazaar.c') diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index 89b024a379..19122e0717 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -80,8 +80,8 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx) cfg->width = avctx->width; cfg->height = avctx->height; - cfg->framerate = - avctx->time_base.den / (double)(avctx->time_base.num * avctx->ticks_per_frame); + cfg->framerate_num = avctx->time_base.den; + cfg->framerate_denom = avctx->time_base.num * avctx->ticks_per_frame; cfg->target_bitrate = avctx->bit_rate; cfg->vui.sar_width = avctx->sample_aspect_ratio.num; cfg->vui.sar_height = avctx->sample_aspect_ratio.den; -- cgit v1.2.3