]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvb: add compensation for maximal frequency delta based on SR
authorJaroslav Kysela <perex@perex.cz>
Wed, 8 Jun 2016 07:22:00 +0000 (09:22 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 8 Jun 2016 07:22:00 +0000 (09:22 +0200)
src/input/mpegts/mpegts_network_dvb.c

index 33d88cc5a3b5bbe513a7ce7215733c8943265953..4790da7102ceb95b2a1ce6c921771db8cbdda4ba 100644 (file)
@@ -520,11 +520,17 @@ dvb_network_find_mux
     /* if ONID/TSID are a perfect match (and this is DVB-S, allow greater deltaf) */
     if (lm->lm_tuning.dmc_fe_type == DVB_TYPE_S) {
       deltar = 10000;
-      if (onid != MPEGTS_ONID_NONE && tsid != MPEGTS_TSID_NONE)
+      if (onid != MPEGTS_ONID_NONE && tsid != MPEGTS_TSID_NONE) {
         deltaf = 16000; // This is slightly crazy, but I have seen 10MHz changes in freq
                         // and remember the ONID and TSID must agree
-      else
+      } else {
+        /* the freq. changes for lower symbol rates might be smaller */
+        if (dmc->u.dmc_fe_qpsk.symbol_rate < 5000000)
+          deltaf = 1900;
+        if (dmc->u.dmc_fe_qpsk.symbol_rate < 10000000)
+          deltaf = 2900;
         deltaf = 4000;
+      }
     }
 
     /* Reject if not same frequency (some tolerance due to changes and diff in NIT) */