diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-01-15 01:34:31 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-01-15 01:34:31 +0000 |
commit | ca078016267dc75019b2de784e27ca9d0d27870e (patch) | |
tree | ac8d84b13b6bce1b55f98e459029cb1408fc4f2a /src | |
parent | f881de2a9c9fab8c1f938fecbc1a8279e33dc729 (diff) | |
parent | 5a5348de4678f4f7226431a7c72f61897980f566 (diff) | |
download | xine-lib-ca078016267dc75019b2de784e27ca9d0d27870e.tar.gz xine-lib-ca078016267dc75019b2de784e27ca9d0d27870e.tar.bz2 |
Merge from 1.2 main.
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/metronom.c | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index 3d44ce39a..0ee481d35 100644 --- a/src/xine-engine/metronom.c +++ b/src/xine-engine/metronom.c @@ -304,8 +304,6 @@ static void metronom_handle_discontinuity (metronom_t *this, int type, /* video_vpts and audio_vpts adjustements */ cur_time = this->xine->clock->get_current_time(this->xine->clock); - xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "current time : %" PRId64 "\n", cur_time); switch (type) { case DISC_STREAMSTART: @@ -322,12 +320,33 @@ static void metronom_handle_discontinuity (metronom_t *this, int type, case DISC_ABSOLUTE: case DISC_RELATIVE: - if (this->video_vpts < this->audio_vpts) { - this->video_vpts = this->audio_vpts; - xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video vpts adjusted to audio vpts %" PRId64 "\n", this->video_vpts); + if (this->video_vpts < cur_time) { + /* still frame */ + if (this->audio_vpts > cur_time) { + /* still frame with audio */ + this->video_vpts = this->audio_vpts; + xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video vpts adjusted to audio vpts %" PRId64 "\n", this->video_vpts); + } else { + /* still frame, no audio */ + this->video_vpts = this->prebuffer + cur_time; + this->audio_vpts = this->video_vpts; + this->audio_vpts_rmndr = 0; + this->force_video_jump = 1; + this->force_audio_jump = 1; + this->video_drift = 0; + xprintf(this->xine, XINE_VERBOSITY_DEBUG, "vpts adjusted with prebuffer to %" PRId64 "\n", + this->video_vpts); + } } else { - this->audio_vpts = this->video_vpts; - xprintf(this->xine, XINE_VERBOSITY_DEBUG, "audio vpts adjusted to video vpts %" PRId64 "\n", this->video_vpts); + /* video */ + if (this->audio_vpts < cur_time) { + /* video, no sound */ + this->audio_vpts = this->video_vpts; + this->audio_vpts_rmndr = 0; + xprintf(this->xine, XINE_VERBOSITY_DEBUG, "audio vpts adjusted to video vpts %" PRId64 "\n", this->video_vpts); + } else { + /* video + audio */ + } } break; } @@ -353,7 +372,7 @@ static void metronom_handle_discontinuity (metronom_t *this, int type, this->vpts_offset = this->video_vpts - disc_off; break; } - + this->last_video_pts = 0; this->last_audio_pts = 0; } |