diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c
index 48ce31b..ce77a12 100644
--- a/formats/ctf-text/ctf-text.c
+++ b/formats/ctf-text/ctf-text.c
@@ -262,13 +262,6 @@ int ctf_text_write_event(struct bt_stream_pos *ppos, struct ctf_stream_definitio
 		return -EINVAL;
 	}
 
-	/* Print events discarded */
-	if (stream->events_discarded) {
-		fflush(pos->fp);
-		ctf_print_discarded(stderr, stream, 0);
-		stream->events_discarded = 0;
-	}
-
 	if (stream->has_timestamp) {
 		set_field_names_print(pos, ITEM_HEADER);
 		if (pos->print_names)
diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c
index 60d9c9f..93563f2 100644
--- a/formats/ctf/ctf.c
+++ b/formats/ctf/ctf.c
@@ -280,10 +280,7 @@ void ctf_update_timestamp(struct ctf_stream_definition *stream,
 	uint64_t oldval, newval, updateval;
 
 	if (unlikely(integer_declaration->len == 64)) {
-		stream->prev_cycles_timestamp = stream->cycles_timestamp;
 		stream->cycles_timestamp = integer_definition->value._unsigned;
-		stream->prev_real_timestamp = ctf_get_real_timestamp(stream,
-				stream->prev_cycles_timestamp);
 		stream->real_timestamp = ctf_get_real_timestamp(stream,
 				stream->cycles_timestamp);
 		return;
@@ -299,12 +296,9 @@ void ctf_update_timestamp(struct ctf_stream_definition *stream,
 	updateval = stream->cycles_timestamp;
 	updateval &= ~((1ULL << integer_declaration->len) - 1);
 	updateval += newval;
-	stream->prev_cycles_timestamp = stream->cycles_timestamp;
 	stream->cycles_timestamp = updateval;
 
 	/* convert to real timestamp */
-	stream->prev_real_timestamp = ctf_get_real_timestamp(stream,
-			stream->prev_cycles_timestamp);
 	stream->real_timestamp = ctf_get_real_timestamp(stream,
 			stream->cycles_timestamp);
 }
@@ -409,24 +403,34 @@ void print_uuid(FILE *fp, unsigned char *uuid)
 		fprintf(fp, "%x", (unsigned int) uuid[i]);
 }
 
-void ctf_print_discarded(FILE *fp, struct ctf_stream_definition *stream,
-		int end_stream)
+/*
+ * Discarded events can be either:
+ * - discarded after end of previous buffer due to buffer full:
+ *     happened within range: [ prev_timestamp_end, timestamp_begin ]
+ * - discarded within current buffer due to either event too large or
+ *   nested wrap-around:
+ *     happened within range: [ timestamp_begin, timestamp_end ]
+ *
+ * Given we have discarded counters of those two types merged into the
+ * events_discarded counter, we need to use the union of those ranges:
+ *   [ prev_timestamp_end, timestamp_end ]
+ */
+void ctf_print_discarded(FILE *fp, struct ctf_stream_definition *stream)
 {
-	fprintf(fp, "[warning] Tracer discarded %" PRIu64 " events %sbetween [",
-		stream->events_discarded,
-		end_stream ? "at end of stream " : "");
+	fprintf(fp, "[warning] Tracer discarded %" PRIu64 " events between [",
+		stream->events_discarded_diff);
 	if (opt_clock_cycles) {
 		ctf_print_timestamp(fp, stream,
-				stream->prev_cycles_timestamp);
+				stream->prev_cycles_timestamp_end);
 		fprintf(fp, "] and [");
 		ctf_print_timestamp(fp, stream,
-				stream->prev_cycles_timestamp_end);
+				stream->cycles_timestamp_end);
 	} else {
 		ctf_print_timestamp(fp, stream,
-				stream->prev_real_timestamp);
+				stream->prev_real_timestamp_end);
 		fprintf(fp, "] and [");
 		ctf_print_timestamp(fp, stream,
-				stream->prev_real_timestamp_end);
+				stream->real_timestamp_end);
 	}
 	fprintf(fp, "] in trace UUID ");
 	print_uuid(fp, stream->stream_class->trace->uuid);
@@ -732,46 +736,12 @@ void ctf_packet_seek(struct bt_stream_pos *stream_pos, size_t index, int whence)
 		switch (whence) {
 		case SEEK_CUR:
 		{
-			uint64_t events_discarded_diff;
-
 			if (pos->offset == EOF) {
 				return;
 			}
 			assert(pos->cur_index < pos->packet_cycles_index->len);
 			assert(pos->cur_index < pos->packet_real_index->len);
 
-			/* For printing discarded event count */
-			packet_index = &g_array_index(pos->packet_cycles_index,
-					struct packet_index, pos->cur_index);
-			file_stream->parent.prev_cycles_timestamp_end =
-				packet_index->timestamp_end;
-			file_stream->parent.prev_cycles_timestamp =
-				packet_index->timestamp_begin;
-
-			packet_index = &g_array_index(pos->packet_real_index,
-					struct packet_index, pos->cur_index);
-			file_stream->parent.prev_real_timestamp_end =
-						packet_index->timestamp_end;
-			file_stream->parent.prev_real_timestamp =
-				packet_index->timestamp_begin;
-
-			events_discarded_diff = packet_index->events_discarded;
-			if (pos->cur_index > 0) {
-				packet_index = &g_array_index(pos->packet_real_index,
-						struct packet_index,
-						pos->cur_index - 1);
-				events_discarded_diff -= packet_index->events_discarded;
-				/*
-				 * Deal with 32-bit wrap-around if the
-				 * tracer provided a 32-bit field.
-				 */
-				if (packet_index->events_discarded_len == 32) {
-					events_discarded_diff = (uint32_t) events_discarded_diff;
-				}
-			}
-			file_stream->parent.events_discarded = events_discarded_diff;
-			file_stream->parent.prev_real_timestamp = file_stream->parent.real_timestamp;
-			file_stream->parent.prev_cycles_timestamp = file_stream->parent.cycles_timestamp;
 			/* The reader will expect us to skip padding */
 			++pos->cur_index;
 			break;
@@ -783,42 +753,79 @@ void ctf_packet_seek(struct bt_stream_pos *stream_pos, size_t index, int whence)
 			}
 			packet_index = &g_array_index(pos->packet_cycles_index,
 					struct packet_index, index);
-			pos->last_events_discarded = packet_index->events_discarded;
 			pos->cur_index = index;
-			file_stream->parent.prev_real_timestamp = 0;
-			file_stream->parent.prev_real_timestamp_end = 0;
-			file_stream->parent.prev_cycles_timestamp = 0;
-			file_stream->parent.prev_cycles_timestamp_end = 0;
 			break;
 		default:
 			assert(0);
 		}
+
 		if (pos->cur_index >= pos->packet_real_index->len) {
-			/*
-			 * We need to check if we are in trace read or
-			 * called from packet indexing.  In this last
-			 * case, the collection is not there, so we
-			 * cannot print the timestamps.
-			 */
-			if ((&file_stream->parent)->stream_class->trace->parent.collection) {
-				/*
-				 * When a stream reaches the end of the
-				 * file, we need to show the number of
-				 * events discarded ourselves, because
-				 * there is no next event scheduled to
-				 * be printed in the output.
-				 */
-				if (file_stream->parent.events_discarded) {
-					fflush(stdout);
-					ctf_print_discarded(stderr,
-						&file_stream->parent,
-						1);
-					file_stream->parent.events_discarded = 0;
-				}
-			}
 			pos->offset = EOF;
 			return;
 		}
+
+		/*
+		 * We need to check if we are in trace read or called
+		 * from packet indexing.  In this last case, the
+		 * collection is not there, so we cannot print the
+		 * timestamps.
+		 */
+		packet_index = &g_array_index(pos->packet_real_index,
+			struct packet_index, pos->cur_index);
+		if ((&file_stream->parent)->stream_class->trace->parent.collection
+				&& packet_index->events_discarded_diff) {
+			/* For printing discarded event count: current packet */
+			packet_index = &g_array_index(pos->packet_cycles_index,
+				struct packet_index, pos->cur_index);
+			file_stream->parent.cycles_timestamp_end =
+				packet_index->timestamp_end;
+			file_stream->parent.cycles_timestamp_begin =
+				packet_index->timestamp_begin;
+
+			packet_index = &g_array_index(pos->packet_real_index,
+				struct packet_index, pos->cur_index);
+			file_stream->parent.prev_real_timestamp_end =
+				packet_index->timestamp_end;
+			file_stream->parent.prev_real_timestamp_begin =
+				packet_index->timestamp_begin;
+
+			file_stream->parent.events_discarded_diff =
+				packet_index->events_discarded_diff;
+			/* For iterator */
+			file_stream->pos.events_discarded_diff =
+				packet_index->events_discarded_diff;
+
+			if (pos->cur_index > 0) {
+				/* For printing discarded event count: previous packet */
+				packet_index = &g_array_index(pos->packet_cycles_index,
+					struct packet_index, pos->cur_index - 1);
+				file_stream->parent.prev_cycles_timestamp_end =
+					packet_index->timestamp_end;
+				file_stream->parent.prev_cycles_timestamp_begin =
+					packet_index->timestamp_begin;
+
+				packet_index = &g_array_index(pos->packet_real_index,
+					struct packet_index, pos->cur_index - 1);
+				file_stream->parent.prev_real_timestamp_end =
+					packet_index->timestamp_end;
+				file_stream->parent.prev_real_timestamp_begin =
+					packet_index->timestamp_begin;
+			} else {
+				/* For printing discarded event count: start of stream */
+				file_stream->parent.prev_cycles_timestamp_end =
+					file_stream->parent.cycles_timestamp_end;
+				file_stream->parent.prev_cycles_timestamp_begin =
+					file_stream->parent.cycles_timestamp_begin;
+
+				file_stream->parent.prev_real_timestamp_end =
+					file_stream->parent.prev_real_timestamp_end;
+				file_stream->parent.prev_real_timestamp_begin =
+					file_stream->parent.prev_real_timestamp_begin;
+			}
+			fflush(stdout);
+			ctf_print_discarded(stderr, &file_stream->parent);
+		}
+
 		packet_index = &g_array_index(pos->packet_cycles_index,
 				struct packet_index,
 				pos->cur_index);
@@ -1398,6 +1405,7 @@ begin:
 	packet_index.timestamp_end = 0;
 	packet_index.events_discarded = 0;
 	packet_index.events_discarded_len = 0;
+	packet_index.events_discarded_diff = 0;
 
 	/* read and check header, set stream id (and check) */
 	if (file_stream->parent.trace_packet_header) {
@@ -1539,10 +1547,29 @@ begin:
 		len_index = bt_struct_declaration_lookup_field_index(file_stream->parent.stream_packet_context->declaration, g_quark_from_static_string("events_discarded"));
 		if (len_index >= 0) {
 			struct bt_definition *field;
+			uint64_t events_discarded_diff;
 
 			field = bt_struct_definition_get_field_from_index(file_stream->parent.stream_packet_context, len_index);
 			packet_index.events_discarded = bt_get_unsigned_int(field);
 			packet_index.events_discarded_len = bt_get_int_len(field);
+
+			events_discarded_diff = packet_index.events_discarded;
+			if (file_stream->pos.packet_cycles_index->len > 0) {
+				struct packet_index *last_packet_index;
+
+				last_packet_index = &g_array_index(pos->packet_cycles_index,
+						struct packet_index,
+						file_stream->pos.packet_cycles_index->len - 1);
+				events_discarded_diff -= last_packet_index->events_discarded;
+				/*
+				 * Deal with 32-bit wrap-around if the
+				 * tracer provided a 32-bit field.
+				 */
+				if (last_packet_index->events_discarded_len == 32) {
+					events_discarded_diff = (uint32_t) events_discarded_diff;
+				}
+			}
+			packet_index.events_discarded_diff = events_discarded_diff;
 		}
 	} else {
 		/* Use file size for packet size */
diff --git a/formats/ctf/iterator.c b/formats/ctf/iterator.c
index d2cd914..ff7910a 100644
--- a/formats/ctf/iterator.c
+++ b/formats/ctf/iterator.c
@@ -137,14 +137,11 @@ struct bt_ctf_event *bt_ctf_iter_read_event_flags(struct bt_ctf_iter *iter,
 		packet_index = &g_array_index(file_stream->pos.packet_cycles_index,
 				struct packet_index, file_stream->pos.cur_index);
 	iter->events_lost = 0;
-	if (packet_index && packet_index->events_discarded >
-			file_stream->pos.last_events_discarded) {
+	if (packet_index && file_stream->pos.events_discarded_diff) {
 		if (flags)
 			*flags |= BT_ITER_FLAG_LOST_EVENTS;
-		iter->events_lost += packet_index->events_discarded -
-			file_stream->pos.last_events_discarded;
-		file_stream->pos.last_events_discarded =
-			packet_index->events_discarded;
+		iter->events_lost += file_stream->pos.events_discarded_diff;
+		file_stream->pos.events_discarded_diff = 0;
 	}
 
 	if (ret->parent->stream->stream_id > iter->callbacks->len)
diff --git a/include/babeltrace/ctf-ir/metadata.h b/include/babeltrace/ctf-ir/metadata.h
index 5e92984..dc0877a 100644
--- a/include/babeltrace/ctf-ir/metadata.h
+++ b/include/babeltrace/ctf-ir/metadata.h
@@ -62,10 +62,18 @@ struct ctf_stream_definition {
 	struct ctf_clock *current_clock;
 
 	/* Event discarded information */
-	uint64_t events_discarded;
-	uint64_t prev_real_timestamp;		/* Start-of-last-packet timestamp in ns */
+	uint64_t events_discarded_diff;
+
+	/* Current packet */
+	uint64_t real_timestamp_begin;	/* Start-of-current-packet timestamp in ns */
+	uint64_t real_timestamp_end;	/* End-of-current-packet timestamp in ns */
+	uint64_t cycles_timestamp_begin;	/* Start-of-current-packet timestamp in cycles */
+	uint64_t cycles_timestamp_end;	/* End-of-current-packet timestamp in cycles */
+
+	/* Last packet */
+	uint64_t prev_real_timestamp_begin;	/* Start-of-last-packet timestamp in ns */
 	uint64_t prev_real_timestamp_end;	/* End-of-last-packet timestamp in ns */
-	uint64_t prev_cycles_timestamp;		/* Start-of-last-packet timestamp in cycles */
+	uint64_t prev_cycles_timestamp_begin;	/* Start-of-last-packet timestamp in cycles */
 	uint64_t prev_cycles_timestamp_end;	/* End-of-last-packet timestamp in cycles */
 	char path[PATH_MAX];			/* Path to stream. '\0' for mmap traces */
 };
diff --git a/include/babeltrace/ctf/events-internal.h b/include/babeltrace/ctf/events-internal.h
index be111c1..c7c28a1 100644
--- a/include/babeltrace/ctf/events-internal.h
+++ b/include/babeltrace/ctf/events-internal.h
@@ -79,7 +79,6 @@ struct bt_ctf_iter {
 	uint64_t events_lost;
 };
 
-void ctf_print_discarded(FILE *fp, struct ctf_stream_definition *stream,
-			int end_stream);
+void ctf_print_discarded(FILE *fp, struct ctf_stream_definition *stream);
 
 #endif /*_BABELTRACE_CTF_EVENTS_INTERNAL_H */
diff --git a/include/babeltrace/ctf/types.h b/include/babeltrace/ctf/types.h
index 96c5083..121dda2 100644
--- a/include/babeltrace/ctf/types.h
+++ b/include/babeltrace/ctf/types.h
@@ -53,6 +53,7 @@ struct packet_index {
 	uint64_t timestamp_end;
 	uint64_t events_discarded;
 	uint64_t events_discarded_len;	/* length of the field, in bits */
+	uint64_t events_discarded_diff;
 };
 
 /*
@@ -76,12 +77,12 @@ struct ctf_stream_pos {
 	int64_t offset;		/* offset from base, in bits. EOF for end of file. */
 	int64_t last_offset;	/* offset before the last read_event */
 	uint64_t cur_index;	/* current index in packet index */
-	uint64_t last_events_discarded;	/* last known amount of event discarded */
 	void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
 			int whence); /* function called to switch packet */
 
 	int dummy;		/* dummy position, for length calculation */
 	struct bt_stream_callbacks *cb;	/* Callbacks registered for iterator. */
+	uint64_t events_discarded_diff;
 };
 
 static inline
diff --git a/lib/iterator.c b/lib/iterator.c
index 009fcd3..047e5bd 100644
--- a/lib/iterator.c
+++ b/lib/iterator.c
@@ -396,9 +396,13 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos)
 			stream_pos->offset = saved_pos->offset;
 			stream_pos->last_offset = LAST_OFFSET_POISON;
 
-			stream->prev_real_timestamp = 0;
+			stream->real_timestamp_begin = 0;
+			stream->real_timestamp_end = 0;
+			stream->cycles_timestamp_begin = 0;
+			stream->cycles_timestamp_end = 0;
+			stream->prev_real_timestamp_begin = 0;
 			stream->prev_real_timestamp_end = 0;
-			stream->prev_cycles_timestamp = 0;
+			stream->prev_cycles_timestamp_begin = 0;
 			stream->prev_cycles_timestamp_end = 0;
 
 			printf_debug("restored to cur_index = %" PRId64 " and "
