From 3de60f8ff7e6988952ccce183820ebcd0ee5f582 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 13 May 2006 19:04:39 +0000 Subject: [PATCH] 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 --- libao2/ao_pcm.c | 6 ++++-- 1 file 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 */