- if (!stream)
- continue;
- for (filenr = 0; filenr < stream->streams->len; filenr++) {
- struct ctf_file_stream *file_stream = g_ptr_array_index(stream->streams, filenr);
- ret = read_event(file_stream);
- if (ret == EOF) {
- ret = 0;
+ td_read = g_ptr_array_index(trace_collection_read->array, i);
+ tin = container_of(td_read, struct ctf_trace, parent);
+
+ /* Populate heap with each stream */
+ for (stream_id = 0; stream_id < tin->streams->len;
+ stream_id++) {
+ struct ctf_stream_class *stream;
+ int filenr;
+
+ stream = g_ptr_array_index(tin->streams, stream_id);
+ if (!stream)