diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-12 20:12:20 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2005-12-12 20:12:20 +0000 |
| commit | 821d8204a00c544ff56a7ac80da22bb0d1e5c81d (patch) | |
| tree | cb81fd1f84b1ce475f5287626f282562c7edef75 /lib/dvb/epgcache.cpp | |
| parent | 7d9a03383fba0b90090e678812c30153a1d3d5a2 (diff) | |
| download | enigma2-821d8204a00c544ff56a7ac80da22bb0d1e5c81d.tar.gz enigma2-821d8204a00c544ff56a7ac80da22bb0d1e5c81d.zip | |
fix
Diffstat (limited to 'lib/dvb/epgcache.cpp')
| -rw-r--r-- | lib/dvb/epgcache.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/dvb/epgcache.cpp b/lib/dvb/epgcache.cpp index b2157693..28718800 100644 --- a/lib/dvb/epgcache.cpp +++ b/lib/dvb/epgcache.cpp @@ -1136,12 +1136,19 @@ RESULT eEPGCache::startTimeQuery(const eServiceReference &service, time_t begin, if ( begin != -1 ) { m_timemap_cursor = It->second.second.lower_bound(begin); - if ( m_timemap_cursor != It->second.second.end() && m_timemap_cursor != It->second.second.begin() ) + if ( m_timemap_cursor != It->second.second.end() ) { - timeMap::iterator it = m_timemap_cursor; - --it; - if ( (it->second->getStartTime() + it->second->getDuration()) > begin ) - m_timemap_cursor = it; + if ( m_timemap_cursor->second->getStartTime() != begin ) + { + timeMap::iterator x = m_timemap_cursor; + --x; + if ( x != It->second.second.end() ) + { + time_t start_time = x->second->getStartTime(); + if ( begin > start_time && begin < (start_time+x->second->getDuration())) + m_timemap_cursor = x; + } + } } } else |
