1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00

Move setting the output filename after the suboption parsing, otherwise it

cannot take the suboptions that were set into account.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18489 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2006-05-13 19:04:39 +00:00
parent 196193ad9e
commit 3de60f8ff7

View File

@ -89,12 +89,14 @@ static int init(int rate,int channels,int format,int flags){
};
// set defaults
ao_pcm_waveheader = 1;
ao_outputfilename =
strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm");
if (subopt_parse(ao_subdevice, subopts) != 0) {
return 0;
}
ao_outputfilename =
strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm");
/* bits is only equal to format if (format == 8) or (format == 16);
this means that the following "if" is a kludge and should
really be a switch to be correct in all cases */