mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 23:02:37 +00: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:
parent
61780877b5
commit
47d716f101
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user