Mercurial > mplayer.hg
changeset 27628:1779bbc0733a
Fix overflow in frequency conversion code inside tvi_dshow.
patch from Laurent laurent dot aml at gmail dot com
author | voroshil |
---|---|
date | Wed, 24 Sep 2008 20:30:06 +0000 |
parents | e556941ac76b |
children | d04568721d39 |
files | stream/tvi_dshow.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/tvi_dshow.c Tue Sep 23 21:44:02 2008 +0000 +++ b/stream/tvi_dshow.c Wed Sep 24 20:30:06 2008 +0000 @@ -3478,7 +3478,7 @@ 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 @@ 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: