From 5115aa181dc00e56c4752b58b9750e1206908a11 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 14 May 2006 10:21:56 +0000 Subject: 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 --- libao2/ao_pcm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libao2/ao_pcm.c') 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 -- cgit v1.2.3