diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-23 00:51:31 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-23 00:51:31 +0000 |
commit | c39510ad6844635f9df031082ac4c83fe1217bcf (patch) | |
tree | 9d964f9a9adb996cdbf326b0f6a026d954bbdd62 | |
parent | ceddcf61a3be530511e9b2507d0bc3ed4301d248 (diff) | |
download | xine-lib-c39510ad6844635f9df031082ac4c83fe1217bcf.tar.gz xine-lib-c39510ad6844635f9df031082ac4c83fe1217bcf.tar.bz2 |
adjust audio_vpts and video_vpts on start so they don't stay much ahead
in the future (it would delay the playback of a new stream).
CVS patchset: 3642
CVS date: 2002/12/23 00:51:31
-rw-r--r-- | src/xine-engine/metronom.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index 0a0e3e037..9883ad318 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.106 2002/12/13 16:47:41 mroi Exp $ + * $Id: metronom.c,v 1.107 2002/12/23 00:51:31 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -302,11 +302,13 @@ static void metronom_handle_video_discontinuity (metronom_t *this, int type, } } - if ( this->video_vpts < this->clock->get_current_time(this->clock) ) { + if ( this->video_vpts < this->clock->get_current_time(this->clock) || + type == DISC_STREAMSTART ) { this->video_vpts = PREBUFFER_PTS_OFFSET + this->clock->get_current_time(this->clock); printf ("metronom: video vpts adjusted with prebuffer to %lld\n", this->video_vpts); } - if ( this->audio_vpts < this->clock->get_current_time(this->clock) ) { + if ( this->audio_vpts < this->clock->get_current_time(this->clock) || + type == DISC_STREAMSTART ) { this->audio_vpts = PREBUFFER_PTS_OFFSET + this->clock->get_current_time(this->clock); printf ("metronom: audio vpts adjusted with prebuffer to %lld\n", this->audio_vpts); } |