stream->prev_cycles_timestamp = 0;
stream->prev_cycles_timestamp_end = 0;
- printf_debug("restored to cur_index = %zd and "
- "offset = %zd, timestamp = %" PRIu64 "\n",
+ printf_debug("restored to cur_index = %" PRId64 " and "
+ "offset = %" PRId64 ", timestamp = %" PRIu64 "\n",
stream_pos->cur_index,
stream_pos->offset, stream->real_timestamp);
if (ret != 0 && ret != EOF) {
goto error;
}
+ if (ret == EOF) {
+ /* Do not add EOF streams */
+ continue;
+ }
ret = heap_insert(iter->stream_heap, file_stream);
if (ret)
goto error;