From 60f4241a6dd6b31349a4e985927ae4806ad88835 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 3 Jan 2005 14:16:07 +0000 Subject: 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 --- libao2/ao_pcm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libao2/ao_pcm.c') 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 -- cgit v1.2.3