index->timestamp_end <= timestamp)
continue;
- stream_pos->cur_index = i;
- stream_pos->packet_seek(&stream_pos->parent,
- index->offset, SEEK_SET);
+ stream_pos->packet_seek(&stream_pos->parent, i, SEEK_SET);
while (cfs->parent.timestamp < timestamp) {
ret = stream_read_event(cfs);
if (ret < 0)
i++) {
struct stream_saved_pos *saved_pos;
struct ctf_stream_pos *stream_pos;
- struct packet_index *index;
struct ctf_stream *stream;
saved_pos = &g_array_index(
struct stream_saved_pos, i);
stream = &saved_pos->file_stream->parent;
stream_pos = &saved_pos->file_stream->pos;
- index = &g_array_index(stream_pos->packet_index,
- struct packet_index,
- saved_pos->cur_index);
- stream_pos->cur_index = saved_pos->cur_index;
stream_pos->packet_seek(&stream_pos->parent,
- index->offset, SEEK_SET);
+ saved_pos->cur_index, SEEK_SET);
/*
* the timestamp needs to be restored after