diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 2bd2e32ee..58951e430 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -237,7 +237,7 @@ bool CRecordInstance::Stop(bool remove_event) } time_t end_time = time(0); - recMovieInfo->length = (int) round((double) (end_time - start_time) / (double) 60); + recMovieInfo->length = (end_time - start_time + 30) / 60; CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, rec_stop_msg.c_str()); if (!(autoshift && g_settings.auto_timeshift)) diff --git a/src/zapit/src/fastscan.cpp b/src/zapit/src/fastscan.cpp index 83a8f33a6..fccd0a349 100644 --- a/src/zapit/src/fastscan.cpp +++ b/src/zapit/src/fastscan.cpp @@ -621,7 +621,7 @@ void CServiceScan::process_satellite_delivery_system_descriptor(const unsigned c if (feparams->dvb_feparams.u.qpsk.symbol_rate >= 50000000) feparams->dvb_feparams.u.qpsk.symbol_rate /= 10; - feparams->dvb_feparams.frequency = (int) 1000 * (int) round ((double) feparams->dvb_feparams.frequency / (double) 1000); + feparams->dvb_feparams.frequency = 1000 * ((feparams->dvb_feparams.frequency + 500) / 1000); #ifdef SCAN_DEBUG printf("[FNT] new TP: sat %d freq %d SR %d fec %d pol %d\n", *satellitePosition, feparams->dvb_feparams.frequency, feparams->dvb_feparams.u.qpsk.symbol_rate, fec_inner, * polarization); diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index 86f95f27e..17cd6f9da 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -353,7 +353,7 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa if(feparams.dvb_feparams.frequency < 20000) feparams.dvb_feparams.frequency = feparams.dvb_feparams.frequency*1000; else - feparams.dvb_feparams.frequency = (int) 1000 * (int) round ((double) feparams.dvb_feparams.frequency / (double) 1000); + feparams.dvb_feparams.frequency = 1000 * ((feparams.dvb_feparams.frequency + 500) / 1000); } freq_id_t freq = CREATE_FREQ_ID(feparams.dvb_feparams.frequency, delsys != FE_QPSK); @@ -534,7 +534,7 @@ void CServiceManager::ParseSatTransponders(fe_type_t fType, xmlNodePtr search, t if(modulation == 2 && ((fe_code_rate_t) xml_fec != FEC_AUTO)) xml_fec += 9; feparams.dvb_feparams.u.qpsk.fec_inner = (fe_code_rate_t) xml_fec; - feparams.dvb_feparams.frequency = (int) 1000 * (int) round ((double) feparams.dvb_feparams.frequency / (double) 1000); + feparams.dvb_feparams.frequency = 1000 * ((feparams.dvb_feparams.frequency + 500) / 1000); } else if (fType == FE_OFDM) { feparams.dvb_feparams.u.ofdm.bandwidth = (fe_bandwidth_t) diff --git a/src/zapit/src/scannit.cpp b/src/zapit/src/scannit.cpp index 756750c84..c5c0d12d6 100644 --- a/src/zapit/src/scannit.cpp +++ b/src/zapit/src/scannit.cpp @@ -358,7 +358,7 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran } feparams.dvb_feparams.u.qpsk.fec_inner = (fe_code_rate_t) fec_inner; - feparams.dvb_feparams.frequency = (int) 1000 * (int) round ((double) feparams.dvb_feparams.frequency / (double) 1000); + feparams.dvb_feparams.frequency = 1000 * ((feparams.dvb_feparams.frequency + 500) / 1000); freq_id_t freq = CREATE_FREQ_ID(feparams.dvb_feparams.frequency, false); transponder_id_t TsidOnid = CREATE_TRANSPONDER_ID64(