Fix: seek by timestamp
[babeltrace.git] / lib / iterator.c
index f79a1d24c222344c8ff890161af2fcb258c2d2d2..0af151402b429d3fe95d9c92c42e9e07eb9436f5 100644 (file)
@@ -110,8 +110,7 @@ static int seek_file_stream_by_timestamp(struct ctf_file_stream *cfs,
        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);
@@ -225,8 +224,6 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos)
                        if (ret)
                                goto error;
                }
-       case BT_SEEK_BEGIN:
-               /* fall-through to seek time of 0 */
        case BT_SEEK_TIME:
                tc = iter->ctx->tc;
 
This page took 0.023575 seconds and 4 git commands to generate.