Mercurial > mplayer.hg
changeset 30525:956bdcb944aa
Change aspect calculation code to switch to floating point earlier so integer
overflows are not possible.
author | reimar |
---|---|
date | Sun, 14 Feb 2010 11:13:20 +0000 |
parents | b4a3bfcbc86c |
children | 68e260df472b |
files | libmpcodecs/vd_theora.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_theora.c Sun Feb 14 11:13:01 2010 +0000 +++ b/libmpcodecs/vd_theora.c Sun Feb 14 11:13:20 2010 +0000 @@ -117,8 +117,8 @@ if(sh->aspect==0.0 && context->inf.aspect_denominator!=0) { - sh->aspect = (float)(context->inf.aspect_numerator * context->inf.frame_width)/ - (context->inf.aspect_denominator * context->inf.frame_height); + sh->aspect = ((double)context->inf.aspect_numerator * context->inf.frame_width)/ + ((double)context->inf.aspect_denominator * context->inf.frame_height); } mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Theora video init ok!\n");