eDebug("now locked to pid %04x", pid);
m_pid = pid;
}
- m_pid = 0x6e;
+// m_pid = 0x6e;
d += 4;
} else
d += 4; /* ignore */
}
/* 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;
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);
}
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<std::pair<off_t, off_t> >::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;
}
start = current_offset;
- size = blocksize;
+ size = max;
eDebug("END OF CUESHEET. (%08llx, %d)", start, size);
return;