Skip to content
Snippets Groups Projects
Commit a403d5f7 authored by Gregory Maxwell's avatar Gregory Maxwell
Browse files

Increase alignment of the internal state structures to sizeof(void *) from 4 bytes.

OpusCustomMode begins with a pointer and was getting misaligned on 64 bit arches.
parent b7034ec2
No related branches found
No related tags found
No related merge requests found
......@@ -74,11 +74,10 @@ int encode_size(int size, unsigned char *data);
int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 len,
opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited, int *packet_offset);
/* Make sure everything's aligned to 4 bytes (this may need to be increased
on really weird architectures) */
/* Make sure everything's aligned to sizeof(void *) bytes */
static inline int align(int i)
{
return (i+3)&-4;
return (i+sizeof(void *)-1)&-sizeof(void *);
}
opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen, int self_delimited);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment