When seeking a stream by timestamp, we need to match the first packet in
the stream that is at (or after) the timestamp to seek to. Failure to do
so is a bug: if we have many streams, and seek all streams to a
timestamp that is after the start time of some of the streams, those
late comers will show no events.
Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
for (i = 0; i < stream_pos->packet_index->len; i++) {
index = &g_array_index(stream_pos->packet_index,
struct packet_index, i);
- if (index->timestamp_begin >= timestamp ||
- index->timestamp_end <= timestamp)
+ if (index->timestamp_end <= timestamp)
continue;
stream_pos->packet_seek(&stream_pos->parent, i, SEEK_SET);