[vlc-devel] [PATCH 2/7] codec/xvmc: Reduce frame rate to simplest fraction
davidf+nntp at woaf.net
davidf+nntp at woaf.net
Thu Nov 27 12:58:47 CET 2008
From: David Flynn <davidf at woaf.net>
Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
modules/codec/xvmc/xxmc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules/codec/xvmc/xxmc.c b/modules/codec/xvmc/xxmc.c
index e502780..2240aa1 100644
--- a/modules/codec/xvmc/xxmc.c
+++ b/modules/codec/xvmc/xxmc.c
@@ -683,10 +683,11 @@ static picture_t *GetNewPicture( decoder_t *p_dec, uint8_t **pp_buf )
if( p_sys->p_info->sequence->frame_period > 0 )
{
- p_dec->fmt_out.video.i_frame_rate =
- (uint32_t)( (uint64_t)1001000000 * 27 /
- p_sys->p_info->sequence->frame_period );
- p_dec->fmt_out.video.i_frame_rate_base = 1001;
+ vlc_ureduce( &p_dec->fmt_out.video.i_frame_rate,
+ &p_dec->fmt_out.video.i_frame_rate_base,
+ 27 * 1000000,
+ p_sys->p_info->sequence->frame_period,
+ 0 );
}
p_dec->fmt_out.i_codec =
--
1.5.6.5
More information about the vlc-devel
mailing list