summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-05-21 20:34:00 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-05-21 20:34:00 +0000
commitd57cabdb9f5c2890a40d047ac9087e8e1f11613d (patch)
treee9e7a39c04bfda3518f804b644155eab405cab66
parent3dfc0beb73b091ee4ed0e1b9b688cc78c5020e99 (diff)
downloadxine-lib-d57cabdb9f5c2890a40d047ac9087e8e1f11613d.tar.gz
xine-lib-d57cabdb9f5c2890a40d047ac9087e8e1f11613d.tar.bz2
avoid segfault with -A null (why would someone play a mp3 without audio? :)
CVS patchset: 1924 CVS date: 2002/05/21 20:34:00
-rw-r--r--src/demuxers/demux_mpgaudio.c8
1 files changed, 7 insertions, 1 deletions
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) {