small fix
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 1 Dec 2005 16:14:19 +0000 (16:14 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 1 Dec 2005 16:14:19 +0000 (16:14 +0000)
lib/dvb/frontend.cpp
lib/dvb/scan.cpp

index 795841b..049753b 100644 (file)
@@ -195,8 +195,8 @@ RESULT eDVBFrontendParameters::getHash(unsigned long &hash) const
        {
        case iDVBFrontend::feSatellite:
        {
-               hash  = sat.frequency & 0xFFFF;
-               hash |= sat.orbital_position << 16;
+               hash = (sat.orbital_position << 16);
+               hash |= ((sat.frequency/1000)&0xFFFF)|((sat.polarisation&1) << 15);
                return 0;
        }
        case iDVBFrontend::feCable:
index 8865f30..e1bd001 100644 (file)
@@ -375,7 +375,22 @@ void eDVBScan::start(const eSmartPtrList<iDVBFrontendParameters> &known_transpon
        m_ch_unavailable.clear();
        m_new_channels.clear();
        m_new_services.clear();
-       m_ch_toScan.insert(m_ch_toScan.end(), known_transponders.begin(), known_transponders.end());
+
+       for (eSmartPtrList<iDVBFrontendParameters>::const_iterator i(known_transponders.begin()); i != known_transponders.end(); ++i)
+       {
+               bool exist=false;
+               for (std::list<ePtr<iDVBFrontendParameters> >::const_iterator ii(m_ch_toScan.begin()); ii != m_ch_toScan.end(); ++ii)
+               {
+                       if (sameChannel(*i, *ii))
+                       {
+                               exist=true;
+                               break;
+                       }
+               }
+               if (!exist)
+                       m_ch_toScan.push_back(*i);
+       }
+
        nextChannel();
 }