diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-05-13 19:04:39 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-05-13 19:04:39 +0000 |
commit | 3de60f8ff7e6988952ccce183820ebcd0ee5f582 (patch) | |
tree | f442eb13b6053d00eb4c774e1276e84a0d732c08 /libao2/ao_pcm.c | |
parent | 196193ad9e48595ea45e2272adcfe07b222cea39 (diff) | |
download | mpv-3de60f8ff7e6988952ccce183820ebcd0ee5f582.tar.bz2 mpv-3de60f8ff7e6988952ccce183820ebcd0ee5f582.tar.xz |
Move setting the output filename after the suboption parsing, otherwise it
cannot take the suboptions that were set into account.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18489 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_pcm.c')
-rw-r--r-- | libao2/ao_pcm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c index 36acf5e703..1c30d2d08f 100644 --- a/libao2/ao_pcm.c +++ b/libao2/ao_pcm.c @@ -89,12 +89,14 @@ static int init(int rate,int channels,int format,int flags){ }; // set defaults ao_pcm_waveheader = 1; - ao_outputfilename = - strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm"); + if (subopt_parse(ao_subdevice, subopts) != 0) { return 0; } + 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 really be a switch to be correct in all cases */ |