From 8580a7e3f20c34fb62ff93d41f6c9ea3a814aa2d Mon Sep 17 00:00:00 2001 From: James Courtier-Dutton Date: Tue, 11 Sep 2001 14:10:04 +0000 Subject: Fix some Floating point exceptions Document return values of audio_out.c:open CVS patchset: 615 CVS date: 2001/09/11 14:10:04 --- src/libmad/xine_decoder.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/libmad/xine_decoder.c') diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c index 94ce433e5..3e5ee3cf9 100644 --- a/src/libmad/xine_decoder.c +++ b/src/libmad/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.5 2001/09/06 13:36:18 jkeil Exp $ + * $Id: xine_decoder.c,v 1.6 2001/09/11 14:10:04 jcdutton Exp $ * * stuff needed to turn libmad into a xine decoder plugin */ @@ -169,13 +169,17 @@ static void mad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { this->frame.header.samplerate, mode); - if (this->output_open) + if (this->output_open) { this->audio_out->close (this->audio_out); - - this->output_open = (this->audio_out->open(this->audio_out, 16, - this->frame.header.samplerate, - mode) == 1); - + } + if (!this->output_open) { + this->output_open = this->audio_out->open(this->audio_out, 16, + this->frame.header.samplerate, + mode) ; + } + if (!this->output_open) { + return; + } this->output_sampling_rate = this->frame.header.samplerate; this->output_mode = mode; } -- cgit v1.2.3