From: Jason Garrett-Glaser Date: Tue, 25 Nov 2008 05:56:24 +0000 (-0800) Subject: Fix crash with threads and SSEMisalign on Phenom X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=3a028c8e50238b7799175bd5a172e5517b4baf8d;p=x264.git Fix crash with threads and SSEMisalign on Phenom Misalign mask needed to be set separately for each encoding thread. --- diff --git a/encoder/encoder.c b/encoder/encoder.c index fbb2ea1d..1fd86113 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -1312,6 +1312,12 @@ static int x264_slices_write( x264_t *h ) { int i_frame_size; +#ifdef HAVE_MMX + /* Misalign mask has to be set separately for each thread. */ + if( h->param.cpu&X264_CPU_SSE_MISALIGN ) + x264_cpu_mask_misalign_sse(); +#endif + #if VISUALIZE if( h->param.b_visualize ) x264_visualize_init( h );