Browse Source

libobs: Use unaligned store rather than aligned store

Prevents a potential crash when being used with audio data that is
unaligned.
jp9000 7 years ago
parent
commit
8211b9e220
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/obs-audio-controls.c

+ 1 - 1
libobs/obs-audio-controls.c

@@ -303,7 +303,7 @@ static int get_nr_channels_from_audio_data(const struct audio_data *data)
 #define hmax_ps(r, x4) \
 	do { \
 		float x4_mem[4]; \
-		_mm_store_ps(x4_mem, x4); \
+		_mm_storeu_ps(x4_mem, x4); \
 		r = x4_mem[0]; \
 		r = fmaxf(r, x4_mem[1]); \
 		r = fmaxf(r, x4_mem[2]); \