From: Felix Domke Date: Wed, 1 Mar 2006 14:18:31 +0000 (+0000) Subject: add missing X-Git-Tag: 2.6.0~3946 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/fbefcdd764d2b41d6f80f1e17e64bd72c79fa31d?hp=8d8279d975474b1cb8befad8d67df26de4104f20 add missing --- diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 5bd8fe6a..3bceebb0 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -767,9 +767,9 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off int relative = seek.first; pts_t pts = seek.second; + pts_t now = 0; if (relative) { - pts_t now; if (!m_cue->m_decoder) { eDebug("no decoder - can't seek relative"); @@ -785,11 +785,29 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off eDebug("seekTo: getCurrentPosition failed!"); continue; } - pts += now; } + + if (relative == 1) /* pts relative */ + pts += now; - if (pts < 0) - pts = 0; + if (relative != 2) + if (pts < 0) + pts = 0; + + if (relative == 2) /* AP relative */ + { + eDebug("AP relative seeking: %lld, at %lld", pts, now); + pts_t nextap; + if (m_tstools.getNextAccessPoint(nextap, now, pts)) + { + pts = now; + eDebug("AP relative seeking failed!"); + } else + { + eDebug("next ap is %llx\n", pts); + pts = nextap; + } + } off_t offset = 0; if (m_tstools.getOffset(offset, pts)) @@ -854,9 +872,6 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off start = current_offset; size = max; eDebug("END OF CUESHEET. (%08llx, %d)", start, size); - - if (size < 4096) - eFatal("blub"); return; }