From 3076975c63c8c3e3b38b0fae5edbb55d808cd931 Mon Sep 17 00:00:00 2001 From: faust3 Date: Thu, 1 Apr 2004 10:35:30 +0000 Subject: although this SSE fix is an ugly hack it seems to work fine for me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12089 b3059339-0415-0410-9bf9-f77b7e298cf2 --- liba52/parse.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/liba52/parse.c b/liba52/parse.c index d3557019d7..4ef47b38fa 100644 --- a/liba52/parse.c +++ b/liba52/parse.c @@ -57,6 +57,19 @@ sample_t * a52_init (uint32_t mm_accel) downmix_accel_init(mm_accel); samples = memalign (16, 256 * 12 * sizeof (sample_t)); +#if defined(__MINGW32__) && defined(HAVE_SSE) + for(i=0;i<10;i++){ + if((int)samples%16){ + sample_t* samplestmp=malloc(256 * 12 * sizeof (sample_t)); + free(samples); + samples = samplestmp; + } + else break; + } + if((int)samples%16){ + printf("unable to get 16 bit aligned memory => expect crashes when using SSE instructions\n"); + } +#endif if (samples == NULL) return NULL; -- cgit v1.2.3