From aa6c019ffeaae2109b383f2a142bf2dab7c2f7b3 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Sat, 16 Jun 2001 18:03:21 +0000 Subject: xine engine cleanups and new callbacks for seamless branching CVS patchset: 192 CVS date: 2001/06/16 18:03:21 --- src/xine-engine/audio_decoder.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/xine-engine/audio_decoder.c') diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 9effea450..1dd4a021f 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_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: audio_decoder.c,v 1.19 2001/06/16 14:34:49 guenter Exp $ + * $Id: audio_decoder.c,v 1.20 2001/06/16 18:03:22 guenter Exp $ * * * functions that implement audio decoding @@ -81,15 +81,18 @@ void *audio_decoder_loop (void *this_gen) { } pthread_mutex_lock (&this->xine_lock); + + if (!this->audio_finished && (buf->decoder_info[0]==0)) { + this->audio_finished = 1; - this->audio_finished = 1; - - if (this->video_finished) { - pthread_mutex_unlock (&this->xine_lock); - xine_notify_stream_finished (this); + if (this->video_finished) { + pthread_mutex_unlock (&this->xine_lock); + xine_notify_stream_finished (this); + } else + pthread_mutex_unlock (&this->xine_lock); } else pthread_mutex_unlock (&this->xine_lock); - + break; case BUF_CONTROL_QUIT: -- cgit v1.2.3