From 5644e6f6cf1478fb7a983e37da5afe006a8b32af Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 21 Nov 2013 20:19:25 -0500 Subject: [PATCH] Fix: Take the iterator's end position into account MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/iterator.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/formats/ctf/iterator.c b/formats/ctf/iterator.c index d2cd914e..d1152fca 100644 --- a/formats/ctf/iterator.c +++ b/formats/ctf/iterator.c @@ -126,6 +126,11 @@ struct bt_ctf_event *bt_ctf_iter_read_event_flags(struct bt_ctf_iter *iter, goto stop; } stream = &file_stream->parent; + if (iter->parent.end_pos && + iter->parent.end_pos->type == BT_SEEK_TIME && + stream->real_timestamp > iter->parent.end_pos->u.seek_time) { + goto stop; + } ret->parent = g_ptr_array_index(stream->events_by_id, stream->event_id); -- 2.34.1