X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=f1fdba178f0a773d28a2286dae9eee133c29e929;hp=d4ff2a52267be7d2a00d2428bd7b42a068875a01;hb=b448902b7c2d8fa734e0d5cb1e6acbb009db97e4;hpb=36741bea2b53007c29ac0391ee9086722e00653a diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index d4ff2a52..f1fdba17 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -550,7 +550,6 @@ error: void ctf_init_pos(struct ctf_stream_pos *pos, int fd, int open_flags) { - memset(pos, 0, sizeof(*pos)); pos->fd = fd; if (fd >= 0) { pos->packet_cycles_index = g_array_new(FALSE, TRUE, @@ -700,6 +699,9 @@ void ctf_packet_seek(struct stream_pos *stream_pos, size_t index, int whence) break; } case SEEK_SET: + packet_index = &g_array_index(pos->packet_cycles_index, + struct packet_index, index); + pos->last_events_discarded = packet_index->events_discarded; pos->cur_index = index; file_stream->parent.prev_real_timestamp = 0; file_stream->parent.prev_real_timestamp_end = 0;