Only set the default output filename when it was not passed on the command

line.  Noticed by Corey Hickey.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18501 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2006-05-14 10:21:56 +00:00
parent 35a6974fe6
commit 5115aa181d
1 changed files with 4 additions and 3 deletions

View File

@ -93,9 +93,10 @@ static int init(int rate,int channels,int format,int flags){
if (subopt_parse(ao_subdevice, subopts) != 0) { if (subopt_parse(ao_subdevice, subopts) != 0) {
return 0; return 0;
} }
if (!ao_outputfilename){
ao_outputfilename = ao_outputfilename =
strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm"); strdup(ao_pcm_waveheader?"audiodump.wav":"audiodump.pcm");
}
/* bits is only equal to format if (format == 8) or (format == 16); /* bits is only equal to format if (format == 8) or (format == 16);
this means that the following "if" is a kludge and should this means that the following "if" is a kludge and should