From 4aa1174b670a1a177ac736ff6fcdae39ef5ba5f5 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Mon, 4 Jun 2001 17:01:47 +0000 Subject: Fixed status callback function call on audio w/o video. CVS patchset: 122 CVS date: 2001/06/04 17:01:47 --- src/xine-engine/audio_decoder.c | 12 +++++++++++- src/xine-engine/video_decoder.c | 14 +++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 6ce7b8bf9..764683574 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.13 2001/06/03 20:16:33 guenter Exp $ + * $Id: audio_decoder.c,v 1.14 2001/06/04 17:01:47 f1rmb Exp $ * * * functions that implement audio decoding @@ -45,6 +45,16 @@ void *audio_decoder_loop (void *this_gen) { this->cur_input_pos = buf->input_pos; + /* + * Call update status callback function if + * there is no video decoder initialized, like + * in .mp3 playback. + */ + if(this->cur_video_decoder_plugin == NULL) { + if(this->status == XINE_PLAY) + this->status_callback (this->status); + } + switch (buf->type) { case BUF_CONTROL_START: diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 69f7ff6d1..325e86c0f 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_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: video_decoder.c,v 1.17 2001/06/03 19:41:05 guenter Exp $ + * $Id: video_decoder.c,v 1.18 2001/06/04 17:01:47 f1rmb Exp $ * */ @@ -39,9 +39,17 @@ void *video_decoder_loop (void *this_gen) { buf = this->video_fifo->get (this->video_fifo); this->cur_input_pos = buf->input_pos; + - if(this->status == XINE_PLAY) - this->status_callback (this->status); + /* + * Call update status callback function if + * there is a video decoder initialized, like + * in mpeg1/2 playback. + */ + if(this->cur_video_decoder_plugin != NULL) { + if(this->status == XINE_PLAY) + this->status_callback (this->status); + } switch (buf->type) { case BUF_CONTROL_START: -- cgit v1.2.3