From 907206eb62886461eeddaf503cc8cfa2175ac50b Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Sat, 10 Nov 2001 14:57:20 +0000 Subject: check for start of stream CVS patchset: 1013 CVS date: 2001/11/10 14:57:20 --- src/xine-engine/metronom.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index e2ce2fda0..8e7d593fe 100644 --- a/src/xine-engine/metronom.c +++ b/src/xine-engine/metronom.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: metronom.c,v 1.33 2001/11/10 13:48:03 guenter Exp $ + * $Id: metronom.c,v 1.34 2001/11/10 14:57:20 heikos Exp $ */ #ifdef HAVE_CONFIG_H @@ -449,19 +449,12 @@ static uint32_t metronom_got_video_frame (metronom_t *this, uint32_t pts, uint32 if (pts) { - /* - * first video pts ? - */ - if (this->video_stream_starting) - this->video_stream_starting = 0; - /* * discontinuity ? */ - - if ( this->video_discontinuity ) { - + if ( this->video_discontinuity || this->video_stream_starting ) { this->video_discontinuity = 0; + this->video_stream_starting = 0; this->video_wrap_offset += this->last_video_pts - pts + this->num_video_vpts_guessed @@ -577,20 +570,13 @@ static uint32_t metronom_got_audio_samples (metronom_t *this, uint32_t pts, if (pts) { - /* - * first audio pts ? - */ - if (this->audio_stream_starting) - this->audio_stream_starting = 0; - /* * discontinuity ? */ - - if ( this->audio_discontinuity ) { - + if ( this->audio_discontinuity || this->audio_stream_starting ) { this->audio_discontinuity = 0; - + this->audio_stream_starting = 0; + this->audio_wrap_offset += this->last_audio_pts - pts + this->num_audio_samples_guessed * (this->audio_pts_delta + this->pts_per_smpls) / AUDIO_SAMPLE_NUM ; -- cgit v1.2.3