SHARE
TWEET

Untitled

a guest Mar 4th, 2012 19 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
  2. index 5fc81ac..f654449 100644
  3. --- a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
  4. +++ b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.cpp
  5. @@ -8,28 +8,6 @@
  6.  #include "mythlogging.h"
  7.  
  8.  
  9. -// Only some of the QTextCodec calls are reenterant.
  10. -// If you use this please verify that you are using a reenterant call.
  11. -static const QTextCodec *iso8859_codecs[16] =
  12. -{
  13. -    QTextCodec::codecForName("Latin1"),
  14. -    QTextCodec::codecForName("ISO8859-1"),  // Western
  15. -    QTextCodec::codecForName("ISO8859-2"),  // Central European
  16. -    QTextCodec::codecForName("ISO8859-3"),  // Central European
  17. -    QTextCodec::codecForName("ISO8859-4"),  // Baltic
  18. -    QTextCodec::codecForName("ISO8859-5"),  // Cyrillic
  19. -    QTextCodec::codecForName("ISO8859-6"),  // Arabic
  20. -    QTextCodec::codecForName("ISO8859-7"),  // Greek
  21. -    QTextCodec::codecForName("ISO8859-8"),  // Hebrew, visually ordered
  22. -    QTextCodec::codecForName("ISO8859-9"),  // Turkish
  23. -    QTextCodec::codecForName("ISO8859-10"),
  24. -    QTextCodec::codecForName("ISO8859-11"),
  25. -    QTextCodec::codecForName("ISO8859-12"),
  26. -    QTextCodec::codecForName("ISO8859-13"),
  27. -    QTextCodec::codecForName("ISO8859-14"),
  28. -    QTextCodec::codecForName("ISO8859-15"), // Western
  29. -};
  30. -
  31.  static QString decode_iso6937(const unsigned char *buf, uint length)
  32.  {
  33.      // ISO/IEC 6937 to unicode (UCS2) convertor...
  34. @@ -119,6 +97,28 @@ QString dvb_decode_text(const unsigned char *src, uint raw_length,
  35.  
  36.  static QString decode_text(const unsigned char *buf, uint length)
  37.  {
  38. +    // Only some of the QTextCodec calls are reentrant.
  39. +    // If you use this please verify that you are using a reentrant call.
  40. +    static const QTextCodec *iso8859_codecs[16] =
  41. +    {
  42. +        QTextCodec::codecForName("Latin1"),
  43. +        QTextCodec::codecForName("ISO8859-1"),  // Western
  44. +        QTextCodec::codecForName("ISO8859-2"),  // Central European
  45. +        QTextCodec::codecForName("ISO8859-3"),  // Central European
  46. +        QTextCodec::codecForName("ISO8859-4"),  // Baltic
  47. +        QTextCodec::codecForName("ISO8859-5"),  // Cyrillic
  48. +        QTextCodec::codecForName("ISO8859-6"),  // Arabic
  49. +        QTextCodec::codecForName("ISO8859-7"),  // Greek
  50. +        QTextCodec::codecForName("ISO8859-8"),  // Hebrew, visually ordered
  51. +        QTextCodec::codecForName("ISO8859-9"),  // Turkish
  52. +        QTextCodec::codecForName("ISO8859-10"),
  53. +        QTextCodec::codecForName("ISO8859-11"),
  54. +        QTextCodec::codecForName("ISO8859-12"),
  55. +        QTextCodec::codecForName("ISO8859-13"),
  56. +        QTextCodec::codecForName("ISO8859-14"),
  57. +        QTextCodec::codecForName("ISO8859-15"), // Western
  58. +    };
  59. +
  60.      // Decode using the correct text codec
  61.      if (buf[0] >= 0x20)
  62.      {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top