[MPlayer-cvslog] CVS: main/libao2 ao_pcm.c,1.26,1.27

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Jan 2 17:39:06 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv10663

Modified Files:
	ao_pcm.c 
Log Message:
Do not use strndup, it is missing on MinGW.


Index: ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- ao_pcm.c	2 Jan 2005 16:01:36 -0000	1.26
+++ ao_pcm.c	2 Jan 2005 16:39:03 -0000	1.27
@@ -93,7 +93,9 @@
 	if (subopt_parse(ao_subdevice, subopts) != 0) {
 	  return 0;
 	}
-	ao_outputfilename = strndup(file.str, file.len);
+	ao_outputfilename = malloc(file.len + 1);
+	memcpy(ao_outputfilename, file.str, file.len);
+	ao_outputfilename[file.len] = 0;
 
 	/* bits is only equal to format if (format == 8) or (format == 16);
 	   this means that the following "if" is a kludge and should




More information about the MPlayer-cvslog mailing list