X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a36fbc3f717012e70a0b37ce5bf8b1920d4a5ff3..70a0ef2a3bf0824236b6b544f256ef9994bdffa5:/lib/dvb/dvb.cpp diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index cb24fc3c..aab903ba 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -722,7 +722,7 @@ int eDVBChannelFilePush::filterRecordData(const unsigned char *_data, int len, s eDebug("now locked to pid %04x", pid); m_pid = pid; } - m_pid = 0x6e; +// m_pid = 0x6e; d += 4; } else d += 4; /* ignore */ @@ -887,7 +887,7 @@ void eDVBChannel::cueSheetEvent(int event) } /* align toward zero */ -static inline int align(long long x, int align) +static inline long long align(long long x, int align) { int sign = x < 0; @@ -933,7 +933,7 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off max = align(m_skipmode_n, blocksize); } - eDebug("getNextSourceSpan, current offset is %08llx!", current_offset); + eDebug("getNextSourceSpan, current offset is %08llx, m_skipmode_m = %d!", current_offset, m_skipmode_m); current_offset += align(m_skipmode_m, blocksize); @@ -1010,14 +1010,14 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off } eDebug("ok, resolved skip (rel: %d, diff %lld), now at %08llx", relative, pts, offset); - current_offset = offset; + current_offset = align(offset, blocksize); /* in case tstools return non-aligned offset */ } for (std::list >::const_iterator i(m_source_span.begin()); i != m_source_span.end(); ++i) { - int aligned_start = align(i->first, blocksize); - int aligned_end = align(i->second, blocksize); - + long long aligned_start = align(i->first, blocksize); + long long aligned_end = align(i->second, blocksize); + if ((current_offset >= aligned_start) && (current_offset < aligned_end)) { start = current_offset; @@ -1078,7 +1078,7 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off } start = current_offset; - size = blocksize; + size = max; eDebug("END OF CUESHEET. (%08llx, %d)", start, size); return;