summaryrefslogtreecommitdiffstats
path: root/libao2/ao_pcm.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-14 10:21:56 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-14 10:21:56 +0000
commit5115aa181dc00e56c4752b58b9750e1206908a11 (patch)
treebec5b65e3f55a713aa781994ef54040e5f32f75e /libao2/ao_pcm.c
parent35a6974fe6b82c3d7f2ebf04e8bca2f793fa42db (diff)
downloadmpv-5115aa181dc00e56c4752b58b9750e1206908a11.tar.bz2
mpv-5115aa181dc00e56c4752b58b9750e1206908a11.tar.xz
Only set the default output filename when it was not passed on the command
line. Noticed by Corey Hickey. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18501 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_pcm.c')
-rw-r--r--libao2/ao_pcm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c
index 1c30d2d08f..249ee5e100 100644
--- a/libao2/ao_pcm.c
+++ b/libao2/ao_pcm.c
@@ -93,9 +93,10 @@ static int init(int rate,int channels,int format,int flags){
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