From d57cabdb9f5c2890a40d047ac9087e8e1f11613d Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 21 May 2002 20:34:00 +0000 Subject: avoid segfault with -A null (why would someone play a mp3 without audio? :) CVS patchset: 1924 CVS date: 2002/05/21 20:34:00 --- src/demuxers/demux_mpgaudio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 838563e4d..4e116b925 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.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: demux_mpgaudio.c,v 1.45 2002/05/21 00:17:57 tmattern Exp $ + * $Id: demux_mpgaudio.c,v 1.46 2002/05/21 20:34:00 miguelfreitas Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -401,6 +401,12 @@ static int demux_mpgaudio_start (demux_plugin_t *this_gen, this->stream_length = 0; this->last_pts = 0; + + if( !audio_fifo ) { + xine_log (this->xine, XINE_LOG_FORMAT, _("demux_mpgaudio: no audio driver!\n") ); + pthread_mutex_unlock( &this->mutex ); + return DEMUX_FINISHED; + } } if((this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) != 0) { -- cgit v1.2.3