summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/mplayer.11
-rw-r--r--libao2/ao_pcm.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 3c2bb1d55c..1a659d33f9 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -1909,6 +1909,7 @@ When not included, raw PCM will be generated.
.IPs file=<filename>
Write the sound to <filename> instead of the default
audiodump.wav.
+If nowaveheader is specified, the default is audiodump.pcm.
.REss
.PD 1
.RS
diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c
index 126d6800c0..28c14a2b0c 100644
--- a/libao2/ao_pcm.c
+++ b/libao2/ao_pcm.c
@@ -88,14 +88,19 @@ static int init(int rate,int channels,int format,int flags){
};
// set defaults
ao_pcm_waveheader = 1;
- file.str = "audiodump.wav";
- file.len = 13;
+ file.str = NULL;
+ file.len = 0;
if (subopt_parse(ao_subdevice, subopts) != 0) {
return 0;
}
+ if (file.len > 0) {
ao_outputfilename = malloc(file.len + 1);
memcpy(ao_outputfilename, file.str, file.len);
ao_outputfilename[file.len] = 0;
+ }
+ else
+ 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