From 329345755ce1b1d76e84de9ea988fde7a52799af Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 12 Mar 2003 15:44:24 +0000 Subject: [PATCH] per context frame_rate_base git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9572 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ve_lavc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index d8438b2d58..0b11819605 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -240,7 +240,12 @@ static int config(struct vf_instance_s* vf, else lavc_venc_context->bit_rate = 800000; /* default */ lavc_venc_context->bit_rate_tolerance= lavc_param_vrate_tolerance*1000; - lavc_venc_context->frame_rate = (float)mux_v->h.dwRate/mux_v->h.dwScale * FRAME_RATE_BASE; +#if LIBAVCODEC_BUILD >= 4662 + lavc_venc_context->frame_rate = mux_v->h.dwRate; + lavc_venc_context->frame_rate_base = mux_v->h.dwScale; +#else + lavc_venc_context->frame_rate = mux_v->h.dwRate*FRAME_RATE_BASE/mux_v->h.dwScale; +#endif lavc_venc_context->qmin= lavc_param_vqmin; lavc_venc_context->qmax= lavc_param_vqmax; #if LIBAVCODEC_BUILD >= 4646