workaround for incorrect west/east flags in NIT entries
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 27 Dec 2006 09:19:34 +0000 (09:19 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 27 Dec 2006 09:19:34 +0000 (09:19 +0000)
lib/dvb/scan.cpp

index a57fd53..d532816 100644 (file)
@@ -444,12 +444,22 @@ void eDVBScan::channelDone()
                                                ePtr<eDVBFrontendParameters> feparm = new eDVBFrontendParameters;
                                                eDVBFrontendParametersSatellite sat;
                                                sat.set(d);
-                                               feparm->setDVBS(sat);
 
                                                eDVBFrontendParametersSatellite p;
                                                m_ch_current->getDVBS(p);
 
-                                               if ( p.orbital_position != sat.orbital_position )
+                                               if ( abs(p.orbital_position - sat.orbital_position) < 5 )
+                                                       sat.orbital_position = p.orbital_position;
+
+                                               if ( abs(abs(3600 - p.orbital_position) - sat.orbital_position) < 5 )
+                                               {
+                                                       eDebug("found transponder with incorrect west/east flag ... correct this");
+                                                       sat.orbital_position = p.orbital_position;
+                                               }
+
+                                               feparm->setDVBS(sat);
+
+                                               if ( p.orbital_position != sat.orbital_position)
                                                        SCAN_eDebug("dropping this transponder, it's on another satellite.");
                                                else
                                                {