Index: libs/libmythtv/mpeg/mpegtables.cpp
===================================================================
--- libs/libmythtv/mpeg/mpegtables.cpp	(revision 7621)
+++ libs/libmythtv/mpeg/mpegtables.cpp	(working copy)
@@ -79,13 +79,16 @@
 {
     _ptrs.clear();
     unsigned char *pos =
-      const_cast<unsigned char*>
+        const_cast<unsigned char*>
         (pesdata() + PSIP_OFFSET + pmt_header + ProgramInfoLength());
-    for (unsigned int i=0; pos < pesdata()+Length(); i++) {
+
+    for (uint i = 0; pos < pesdata() + Length(); i++)
+    {
         _ptrs.push_back(pos);
         pos += 5 + StreamInfoLength(i);
     }
     _ptrs.push_back(pos);
+    VERBOSE(VB_IMPORTANT, "Parsed PMT(0x"<<this<<") "<<this->toString());
 }
 
 void ProgramMapTable::AppendStream(
Index: libs/libmythtv/siscan.cpp
===================================================================
--- libs/libmythtv/siscan.cpp	(revision 7621)
+++ libs/libmythtv/siscan.cpp	(working copy)
@@ -373,7 +373,8 @@
     }
 }
 
-void SIScan::HandleATSCDBInsertion(const ScanStreamData *sd, bool wait_until_complete)
+void SIScan::HandleATSCDBInsertion(const ScanStreamData *sd,
+                                   bool wait_until_complete)
 {
     bool hasAll = sd->HasCachedAllVCTs();
     if (wait_until_complete && !hasAll)
@@ -979,7 +980,16 @@
 
     for (uint i = 0; i < pat->ProgramCount(); i++)
     {
-        const ProgramMapTable *pmt = pmt_map[pat->ProgramNumber(i)];
+        pmt_map_t::const_iterator it = pmt_map.find(pat->ProgramNumber(i));
+        if (it == pmt_map.end())
+        {
+            VERBOSE(VB_SIPARSER,
+                   QString("UpdatePATinDB(): PMT for Program #%1 is missing")
+                   .arg(pat->ProgramNumber(i)));
+            continue;
+        }
+
+        const ProgramMapTable *pmt = *it;
         VERBOSE(VB_SIPARSER,
                 QString("UpdatePATinDB(): Prog %1 PID %2: PMT @")
                 .arg(pat->ProgramNumber(i))
@@ -989,6 +999,8 @@
         // ignore services we have decided to ignore
         if (!pmt)
             continue;
+        else if (pmt->StreamCount() <= 0)
+            continue;
         else if (ignoreAudioOnlyServices && pmt->IsStillPicture())
             continue;
         else if (ignoreEncryptedServices && pmt->IsEncrypted())
