mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-27 05:49:38 +08:00
Do not use strndup, it is missing on MinGW.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14302 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
+3
-1
@@ -93,7 +93,9 @@ static int init(int rate,int channels,int format,int flags){
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user