Ticket #9447: dvbdescriptors-move_global_iso8859_codecs_array-05bc5e16a4.patch

File dvbdescriptors-move_global_iso8859_codecs_array-05bc5e16a4.patch, 2.7 KB (added by mythtv@…, 8 years ago)
  • mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp

    diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
    index 0fa48b6..5fc81ac 100644
    a b  
    88#include "mythlogging.h"
    99
    1010
     11// Only some of the QTextCodec calls are reenterant.
     12// If you use this please verify that you are using a reenterant call.
     13static const QTextCodec *iso8859_codecs[16] =
     14{
     15    QTextCodec::codecForName("Latin1"),
     16    QTextCodec::codecForName("ISO8859-1"),  // Western
     17    QTextCodec::codecForName("ISO8859-2"),  // Central European
     18    QTextCodec::codecForName("ISO8859-3"),  // Central European
     19    QTextCodec::codecForName("ISO8859-4"),  // Baltic
     20    QTextCodec::codecForName("ISO8859-5"),  // Cyrillic
     21    QTextCodec::codecForName("ISO8859-6"),  // Arabic
     22    QTextCodec::codecForName("ISO8859-7"),  // Greek
     23    QTextCodec::codecForName("ISO8859-8"),  // Hebrew, visually ordered
     24    QTextCodec::codecForName("ISO8859-9"),  // Turkish
     25    QTextCodec::codecForName("ISO8859-10"),
     26    QTextCodec::codecForName("ISO8859-11"),
     27    QTextCodec::codecForName("ISO8859-12"),
     28    QTextCodec::codecForName("ISO8859-13"),
     29    QTextCodec::codecForName("ISO8859-14"),
     30    QTextCodec::codecForName("ISO8859-15"), // Western
     31};
     32
    1133static QString decode_iso6937(const unsigned char *buf, uint length)
    1234{
    1335    // ISO/IEC 6937 to unicode (UCS2) convertor...
    QString dvb_decode_text(const unsigned char *src, uint raw_length, 
    97119
    98120static QString decode_text(const unsigned char *buf, uint length)
    99121{
    100         // Only some of the QTextCodec calls are reenterant.
    101         // If you use this please verify that you are using a reenterant call.
    102         static const QTextCodec *iso8859_codecs[16] =
    103         {
    104             QTextCodec::codecForName("Latin1"),
    105             QTextCodec::codecForName("ISO8859-1"),  // Western
    106             QTextCodec::codecForName("ISO8859-2"),  // Central European
    107             QTextCodec::codecForName("ISO8859-3"),  // Central European
    108             QTextCodec::codecForName("ISO8859-4"),  // Baltic
    109             QTextCodec::codecForName("ISO8859-5"),  // Cyrillic
    110             QTextCodec::codecForName("ISO8859-6"),  // Arabic
    111             QTextCodec::codecForName("ISO8859-7"),  // Greek
    112             QTextCodec::codecForName("ISO8859-8"),  // Hebrew, visually ordered
    113             QTextCodec::codecForName("ISO8859-9"),  // Turkish
    114             QTextCodec::codecForName("ISO8859-10"),
    115             QTextCodec::codecForName("ISO8859-11"),
    116             QTextCodec::codecForName("ISO8859-12"),
    117             QTextCodec::codecForName("ISO8859-13"),
    118             QTextCodec::codecForName("ISO8859-14"),
    119             QTextCodec::codecForName("ISO8859-15"), // Western
    120         };
    121 
    122122    // Decode using the correct text codec
    123123    if (buf[0] >= 0x20)
    124124    {