X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fesection.h;h=6efe8c38b54f6774aa42605341b76a01551cfe3d;hp=b4782f810491edc303179d4b88393656a6070a16;hb=9d9d69d8242d27915c95cb794bd4e7a93759b6db;hpb=f0b00150221004f6dc14652df2a0a27f4bf81127 diff --git a/lib/dvb/esection.h b/lib/dvb/esection.h index b4782f8..6efe8c3 100644 --- a/lib/dvb/esection.h +++ b/lib/dvb/esection.h @@ -40,6 +40,7 @@ class eTable: public eGTable private: std::vector sections; std::set avail; + unsigned char m_section_data[4096]; protected: int createTable(unsigned int nr, const __u8 *data, unsigned int max) { @@ -53,6 +54,9 @@ protected: if (avail.find(nr) != avail.end()) delete sections[nr]; + memset(m_section_data, 0, 4096); + memcpy(m_section_data, data, 4096); + sections.resize(max); sections[nr] = new Section(data); avail.insert(nr); @@ -63,7 +67,7 @@ protected: else TABLE_eDebugNoNewLine("-"); - TABLE_eDebug(" %d/%d TID %02x", avail.size(), max, data[0]); + TABLE_eDebug(" %zd/%d TID %02x", avail.size(), max, data[0]); if (avail.size() == max) { @@ -74,6 +78,7 @@ protected: } public: std::vector &getSections() { return sections; } + unsigned char* getBufferData() { return m_section_data; } eTable(bool debug=true): eGTable(debug) { }