From 9c7fc92c6c391b037393721dbe8742ddd260b1d1 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Sun, 12 Aug 2001 15:12:54 +0000 Subject: cancel demux thread on xine_stop instead of pthread_join to prevent hang CVS patchset: 415 CVS date: 2001/08/12 15:12:54 --- src/demuxers/demux_mpgaudio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/demuxers/demux_mpgaudio.c') diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 7da1e26cf..9f2a8c9c9 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000 the xine project + * Copyright (C) 2000, 2001 the xine project * * This file is part of xine, a unix video player. * @@ -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.15 2001/07/14 12:50:34 guenter Exp $ + * $Id: demux_mpgaudio.c,v 1.16 2001/08/12 15:12:54 guenter Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -139,8 +139,8 @@ static void *demux_mpgaudio_loop (void *this_gen) { } static void demux_mpgaudio_stop (demux_plugin_t *this_gen) { + demux_mpgaudio_t *this = (demux_mpgaudio_t *) this_gen; - void *p; buf_element_t *buf; if (this->status != DEMUX_OK) { @@ -151,7 +151,7 @@ static void demux_mpgaudio_stop (demux_plugin_t *this_gen) { this->send_end_buffers = 0; this->status = DEMUX_FINISHED; - pthread_join (this->thread, &p); + pthread_cancel (this->thread); this->video_fifo->clear(this->video_fifo); if (this->audio_fifo) -- cgit v1.2.3