X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fir%2Fstream.c;h=93982b3b48b13796a61f194862f1bc30a04c0b44;hb=eee752e5a2f89dce066f25c48a868474a10e923f;hp=8b60e1e86ddf5f10e846120ee58323872b0c5ac8;hpb=9f476966aa40bd0de2cd0654623ea03f8a3254eb;p=babeltrace.git diff --git a/formats/ctf/ir/stream.c b/formats/ctf/ir/stream.c index 8b60e1e8..93982b3b 100644 --- a/formats/ctf/ir/stream.c +++ b/formats/ctf/ir/stream.c @@ -296,7 +296,6 @@ struct bt_ctf_stream *bt_ctf_stream_create( stream->id = stream_class->next_stream_id++; stream->stream_class = stream_class; bt_ctf_stream_class_get(stream_class); - bt_ctf_stream_class_freeze(stream_class); stream->events = g_ptr_array_new_with_free_func( (GDestroyNotify) bt_ctf_event_put); if (!stream->events) { @@ -707,10 +706,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) {