[Mplayer-cvslog] CVS: main/liba52 parse.c,1.5,1.6

Sascha Sommer CVS syncmail at mplayerhq.hu
Thu Apr 1 12:17:04 CEST 2004


CVS change done by Sascha Sommer CVS

Update of /cvsroot/mplayer/main/liba52
In directory mail:/var2/tmp/cvs-serv22865/liba52

Modified Files:
	parse.c 
Log Message:
although this SSE fix is an ugly hack it seems to work fine for me

Index: parse.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/parse.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- parse.c	12 May 2002 02:18:49 -0000	1.5
+++ parse.c	1 Apr 2004 10:17:02 -0000	1.6
@@ -57,6 +57,19 @@
     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;
 




More information about the MPlayer-cvslog mailing list