diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-03 14:16:07 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-03 14:16:07 +0000 |
commit | 60f4241a6dd6b31349a4e985927ae4806ad88835 (patch) | |
tree | a58e1d6e702d721cbc8b9446cebd9420a69bdf84 | |
parent | 8f3e5a996cd6b314efb947441d816040171cd0ab (diff) | |
download | mpv-60f4241a6dd6b31349a4e985927ae4806ad88835.tar.bz2 mpv-60f4241a6dd6b31349a4e985927ae4806ad88835.tar.xz |
Default to audiodump.pcm with nowaveheader again, but document it in the manpage this time.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14328 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/en/mplayer.1 | 1 | ||||
-rw-r--r-- | libao2/ao_pcm.c | 9 |
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 |