diff options
Diffstat (limited to 'p2pvr/scanner/eitRows.cpp')
-rw-r--r-- | p2pvr/scanner/eitRows.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/p2pvr/scanner/eitRows.cpp b/p2pvr/scanner/eitRows.cpp index bdc46f0..f5bcf51 100644 --- a/p2pvr/scanner/eitRows.cpp +++ b/p2pvr/scanner/eitRows.cpp @@ -393,26 +393,17 @@ static bool validateDescription(const u_char *data, size_t len) { return false; } /*}}}*/ -class SeenProgram { - public: - SeenProgram(int sid, int eid); - bool operator<(const SeenProgram &) const; - const int sid; - const int eid; -}; -SeenProgram::SeenProgram(int s, int e) : +EitRows::SeenProgram::SeenProgram(int s, int e) : sid(s), eid(e) { } bool -SeenProgram::operator<(const SeenProgram & o) const +EitRows::SeenProgram::operator<(const SeenProgram & o) const { return ((this->sid < o.sid) || ((this->sid == o.sid) && (this->eid < o.eid))); } -typedef std::set<SeenProgram> SeenPrograms; -SeenPrograms seenPrograms; bool EitRows::parseInfoTable(const u_char *data, size_t len, const RowProcessor * rp) const { const struct eit *e = reinterpret_cast<const struct eit *>(data); @@ -486,8 +477,15 @@ EitRows::filterInput(int fd) const void EitRows::execute(const RowProcessor * rp) const { - openInput(); - readTables(rp); - closeInput(); + try { + openInput(); + readTables(rp); + closeInput(); + seenPrograms.clear(); + } + catch (...) { + seenPrograms.clear(); + throw; + } } |