提交 8211b9e2 编写于 作者: J jp9000

libobs: Use unaligned store rather than aligned store

Prevents a potential crash when being used with audio data that is
unaligned.
上级 4785d990
...@@ -303,7 +303,7 @@ static int get_nr_channels_from_audio_data(const struct audio_data *data) ...@@ -303,7 +303,7 @@ static int get_nr_channels_from_audio_data(const struct audio_data *data)
#define hmax_ps(r, x4) \ #define hmax_ps(r, x4) \
do { \ do { \
float x4_mem[4]; \ float x4_mem[4]; \
_mm_store_ps(x4_mem, x4); \ _mm_storeu_ps(x4_mem, x4); \
r = x4_mem[0]; \ r = x4_mem[0]; \
r = fmaxf(r, x4_mem[1]); \ r = fmaxf(r, x4_mem[1]); \
r = fmaxf(r, x4_mem[2]); \ r = fmaxf(r, x4_mem[2]); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册