Use a struct header

The header fields (timestamp and data length) were handled separately.

To avoid several calls to memcpy(), and manual and error-prone offsets
computation, it is better to use a struct header, containing the fields.
Avoid "maybe-uninitialized" compiler warning

The variable next_chunk_timestamp is always initialized when it is read,
thanks to the flag has_next_chunk. However, gcc fails to detect this
property.

Initializing it with a default value removes the warning.