[MPlayer-cvslog] r27660 - trunk/stream/tvi_dshow.c
voroshil
subversion at mplayerhq.hu
Wed Sep 24 22:30:06 CEST 2008
Author: voroshil
Date: Wed Sep 24 22:30:06 2008
New Revision: 27660
Log:
Fix overflow in frequency conversion code inside tvi_dshow.
patch from Laurent laurent dot aml at gmail dot com
Modified:
trunk/stream/tvi_dshow.c
Modified: trunk/stream/tvi_dshow.c
==============================================================================
--- trunk/stream/tvi_dshow.c (original)
+++ trunk/stream/tvi_dshow.c Wed Sep 24 22:30:06 2008
@@ -3478,7 +3478,7 @@ static int control(priv_t * priv, int cm
return TVI_CONTROL_FALSE;
ret = get_frequency(priv, &lFreq);
- lFreq = lFreq * 16 / 1000000; //convert from Hz to 1/16 MHz units
+ lFreq = lFreq / (1000000/16); //convert from Hz to 1/16 MHz units
*(unsigned long *) arg = lFreq;
return ret;
@@ -3489,7 +3489,7 @@ static int control(priv_t * priv, int cm
if (!priv->pTVTuner)
return TVI_CONTROL_FALSE;
//convert to Hz
- nFreq = 1000000 * nFreq / 16; //convert from 1/16 MHz units to Hz
+ nFreq = (1000000/16) * nFreq; //convert from 1/16 MHz units to Hz
return set_frequency(priv, nFreq);
}
case TVI_CONTROL_VID_SET_HUE:
More information about the MPlayer-cvslog
mailing list