Merge branch 'bug_570_playback_skip_fixes_and_cleanup_ml_aholst'
[enigma2.git] / lib / dvb / pvrparse.cpp
index 1393bf77847a6ec384bba54b0bf31cd4fc8cd25a..e19dd1e46ec2bd71f4f3f08f4bd6af98b5945848 100644 (file)
@@ -123,7 +123,7 @@ void eMPEGStreamInformation::fixupDiscontinuties()
                pts_t current = i->second - currentDelta;
                pts_t diff = current - lastpts_t;
                
-               if (llabs(diff) > (90000*5)) // 5sec diff
+               if (llabs(diff) > (90000*10)) // 10sec diff
                {
 //                     eDebug("%llx < %llx, have discont. new timestamp is %llx (diff is %llx)!", current, lastpts_t, i->second, diff);
                        currentDelta = i->second - lastpts_t; /* FIXME: should be the extrapolated new timestamp, based on the current rate */
@@ -244,6 +244,7 @@ off_t eMPEGStreamInformation::getAccessPoint(pts_t ts, int marg)
        off_t last = 0;
        off_t last2 = 0;
        pts_t lastc = 0;
+       ts += 1; // Add rounding error margin
        for (std::map<off_t, pts_t>::const_iterator i(m_access_points.begin()); i != m_access_points.end(); ++i)
        {
                pts_t delta = getDelta(i->first);