Change aspect calculation code to switch to floating point earlier so integer

overflows are not possible.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30567 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-02-14 11:13:20 +00:00
parent 4e9a7e9a68
commit f2488e8537
1 changed files with 2 additions and 2 deletions

View File

@ -117,8 +117,8 @@ static int init(sh_video_t *sh){
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");