Fix: lazy-mmap() streams when flushing
[babeltrace.git] / formats / ctf / ir / stream.c
index 6a71466ca3a60022a178b684b43508e4bed6a5be..1d14abd69a76ba2de62c8bd320553b493f1c70ce 100644 (file)
@@ -702,10 +702,8 @@ int bt_ctf_stream_flush(struct bt_ctf_stream *stream)
                goto end;
        }
 
-       if (stream->flushed_packet_count) {
-               /* ctf_init_pos has already initialized the first packet */
-               ctf_packet_seek(&stream->pos.parent, 0, SEEK_CUR);
-       }
+       /* mmap the next packet */
+       ctf_packet_seek(&stream->pos.parent, 0, SEEK_CUR);
 
        ret = bt_ctf_field_serialize(stream->packet_header, &stream->pos);
        if (ret) {
This page took 0.02318 seconds and 4 git commands to generate.