From 1248f263c9bc4aa7d69e59f8be4c9baed74dc2f0 Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Thu, 6 Sep 2001 13:36:18 +0000 Subject: Fix error checking for failed ao_instance->open CVS patchset: 577 CVS date: 2001/09/06 13:36:18 --- src/libmad/xine_decoder.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/libmad') diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c index 6ca98cc85..94ce433e5 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.4 2001/09/01 21:56:38 guenter Exp $ + * $Id: xine_decoder.c,v 1.5 2001/09/06 13:36:18 jkeil Exp $ * * stuff needed to turn libmad into a xine decoder plugin */ @@ -172,11 +172,10 @@ static void mad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { if (this->output_open) this->audio_out->close (this->audio_out); - this->audio_out->open(this->audio_out, - 16, this->frame.header.samplerate, - mode); + this->output_open = (this->audio_out->open(this->audio_out, 16, + this->frame.header.samplerate, + mode) == 1); - this->output_open = 1; this->output_sampling_rate = this->frame.header.samplerate; this->output_mode = mode; } -- cgit v1.2.3