fix Freesat-EPG, thx Houdini & bazi98

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1486 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 90c5683746
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-05-23 (Mon, 23 May 2011)

Origin message was:
------------------
-fix Freesat-EPG, thx Houdini & bazi98

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1486 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
Jacek Jendrzej
2011-05-23 18:50:35 +00:00
parent 6c3f91783a
commit 0901396373
2 changed files with 19 additions and 8 deletions

View File

@@ -390,7 +390,8 @@ std::string SIsectionEIT::freesatHuffmanDecode(std::string input)
return uncompressed;
}
} while (lastch != STOP && value != 0);
uncompressed.resize(p);
uncompressed.resize(p);
return uncompressed;
}
else return input;
@@ -421,8 +422,10 @@ void SIsectionEIT::parseShortEventDescriptor(const char *buf, SIevent &e, unsign
#endif // 0
{
#ifdef ENABLE_FREESATEPG
// FIXME convertDVBUTF8
e.setName(language, buf[0] == 0x1f ? freesatHuffmanDecode(std::string(buf, evt->event_name_length)) : std::string(buf, evt->event_name_length));
// e.setName(language, buf[0] == 0x1f ? freesatHuffmanDecode(std::string(buf, evt->event_name_length)) : std::string(buf, evt->event_name_length));
std::string tmp_str = buf[0] == 0x1f ? freesatHuffmanDecode(std::string(buf, evt->event_name_length)) : std::string(buf, evt->event_name_length);
e.setName(language, convertDVBUTF8(tmp_str.c_str(), tmp_str.size(), table, tsidonid));
#else
//e.setName(language, std::string(buf, evt->event_name_length));
e.setName(language, convertDVBUTF8(buf, evt->event_name_length, table, tsidonid));
@@ -443,7 +446,9 @@ void SIsectionEIT::parseShortEventDescriptor(const char *buf, SIevent &e, unsign
#endif // 0
{
#ifdef ENABLE_FREESATEPG
e.setText(language, buf[1] == 0x1f ? freesatHuffmanDecode(std::string(++buf, textlength)) : std::string(++buf, textlength));
// e.setText(language, buf[1] == 0x1f ? freesatHuffmanDecode(std::string(++buf, textlength)) : std::string(++buf, textlength));
std::string tmp_str = buf[1] == 0x1f ? freesatHuffmanDecode(std::string(++buf, textlength)) : std::string(++buf, textlength);
e.setText(language, convertDVBUTF8(tmp_str.c_str(), tmp_str.size(), table, tsidonid));
#else
//e.setText(language, std::string(++buf, textlength));
e.setText(language, convertDVBUTF8((++buf), textlength, table, tsidonid));