[MPlayer-dev-eng] Rounding error in libmpdemux/video.c
    Reimar Döffinger 
    Reimar.Doeffinger at gmx.de
       
    Tue May 12 19:07:36 CEST 2009
    
    
  
On Sat, Feb 07, 2009 at 03:29:24PM +0100, Andreas Gustafsson wrote:
> 
> Row 579:
>               mp_msg(MSGT_CPLAYER,MSGL_V,"\navg. framerate: %d fps             \n",(int)(1.0f/d));
> 
> Incorrectly cuts the decimals (25fps movies 24.999... gives 24fps)
> This will fix the problem:
> 
>               mp_msg(MSGT_CPLAYER,MSGL_V,"\navg. framerate: %.0f fps             \n",(1.0f/d));
> 
> 
> Hope this will help.
Well, the question is why is this printed at all, what is the purpose of the message?
To get rounding, you could just add a "+ 0.5", but why not print 3 fractional decimal
places like FPS is printed elsewhere? Why not maybe just remove this message?
    
    
More information about the MPlayer-dev-eng
mailing list