changeset 18500:9533f21d3f7e

Only set the default output filename when it was not passed on the command line. Noticed by Corey Hickey.
author diego
date Sun, 14 May 2006 10:21:56 +0000
parents b6f5e8a8219e
children e5b65b94eb73
files libao2/ao_pcm.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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