Skip to content

tools: Allocate the priv structs with proper alignment

Martin Storsjö requested to merge mstorsjo/dav1d:io-priv-alloc into master

Previously, they could be allocated with any random alignment according to the end of the MuxerContext/DemuxerContext. The priv structs themselves can have members can require at least the default alignment of malloc()/calloc() (which is sufficient for native types such as uint64_t and doubles).

This fixes crashes in some arm builds, where GCC (correctly) wants to use 64 bit aligned stores to write to MD5Context.

Merge request reports