# HG changeset patch # User diego # Date 1147602116 0 # Node ID 9533f21d3f7e572cd6b88a5b31da20532ea4c181 # Parent b6f5e8a8219eb8897f6726adb7722a47558c8880 Only set the default output filename when it was not passed on the command line. Noticed by Corey Hickey. diff -r b6f5e8a8219e -r 9533f21d3f7e libao2/ao_pcm.c --- a/libao2/ao_pcm.c Sun May 14 09:03:22 2006 +0000 +++ b/libao2/ao_pcm.c Sun May 14 10:21:56 2006 +0000 @@ -93,9 +93,10 @@ if (subopt_parse(ao_subdevice, subopts) != 0) { return 0; } - - ao_outputfilename = - strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm"); + if (!ao_outputfilename){ + 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