Index: libs/libmythtv/mpeg/dvbdescriptors.cpp
===================================================================
--- libs/libmythtv/mpeg/dvbdescriptors.cpp	(revision 9206)
+++ libs/libmythtv/mpeg/dvbdescriptors.cpp	(working copy)
@@ -7,8 +7,10 @@
 // Decode a text string according to ETSI EN 300 468 Annex A
 QString dvb_decode_text(const unsigned char *src, uint length)
 {
+    // array for caching all 16 ISO8859 tables
+    static QTextCodec * codecs[16];
     QString result;
-
+    
     if (!length)
         return QString("");
 
@@ -30,9 +32,13 @@
         }
         else if ((buf[0] >= 0x01) && (buf[0] <= 0x0B))
         {
-            QString coding = "ISO8859-" + QString::number(4 + buf[0]);
-            QTextCodec *codec = QTextCodec::codecForName(coding);
-            result = codec->toUnicode((const char*)buf + 1, length - 1);
+            uint code = 4 + buf[0];
+            if (!codecs[code-1])
+            {
+                QString coding = "ISO8859-" + QString::number(code);
+                codecs[code-1] = QTextCodec::codecForName(coding);
+            }
+            result = codecs[code-1]->toUnicode((const char*)buf + 1, length - 1);
         }
         else if (buf[0] == 0x10)
         {
@@ -44,9 +50,21 @@
 
             uint code = 1;
             swab(buf + 1, &code, 2);
-            QString coding = "ISO8859-" + QString::number(code);
-            QTextCodec *codec = QTextCodec::codecForName(coding);
-            result = codec->toUnicode((const char*)buf + 3, length - 3);
+            // check for valid ISO8859 code table
+            if (code>0 && code<17)
+            {
+                if (!codecs[code-1]) {
+                    QString coding = "ISO8859-" + QString::number(code);
+                    codecs[code-1] = QTextCodec::codecForName(coding);
+                }
+                result = codecs[code-1]->toUnicode((const char*)buf + 3, length - 3);
+            }
+            else
+            {
+                VERBOSE(VB_SIPARSER, "dvbdescriptors.cpp: "
+                        "Invalid encoding - ignoring (maybe transmission error)");
+                result = "N/A";
+            }
         }
         else
         {
