- stream_range->begin_ns = min(stream_range->begin_ns, file_begin_epoch);
- stream_range->end_ns = max(stream_range->end_ns, file_end_epoch);
- stream_range->set = true;
- }
+ first_file_info = g_ptr_array_index(group->ds_file_infos, 0);
+ last_file_info = g_ptr_array_index(group->ds_file_infos,
+ group->ds_file_infos->len - 1);
+
+ BT_ASSERT(first_file_info->index->entries->len > 0);
+
+ first_ds_index_entry = (struct ctf_fs_ds_index_entry *) &g_array_index(
+ first_file_info->index->entries, struct ctf_fs_ds_index_entry, 0);
+
+ BT_ASSERT(last_file_info->index->entries->len > 0);
+
+ last_ds_index_entry = (struct ctf_fs_ds_index_entry *) &g_array_index(
+ last_file_info->index->entries, struct ctf_fs_ds_index_entry,
+ last_file_info->index->entries->len - 1);
+
+ stream_range->begin_ns = first_ds_index_entry->timestamp_begin_ns;
+ stream_range->end_ns = last_ds_index_entry->timestamp_end_ns;
+ stream_range->set = true;