From 5193fe68baca652e1b8fd978f0b3387395f54f36 Mon Sep 17 00:00:00 2001 From: James Courtier-Dutton Date: Wed, 24 Apr 2002 20:26:06 +0000 Subject: Some more adjustments to make dvd menus work better. CVS patchset: 1774 CVS date: 2002/04/24 20:26:06 --- src/xine-engine/metronom.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/xine-engine/metronom.c') diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index eaf93bf33..e1e3d79c2 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.81 2002/04/17 22:02:13 miguelfreitas Exp $ + * $Id: metronom.c,v 1.82 2002/04/24 20:26:07 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H @@ -254,22 +254,20 @@ static void metronom_set_audio_rate (metronom_t *this, int64_t pts_per_smpls) { } -static int64_t metronom_got_spu_packet (metronom_t *this, int64_t pts, - int64_t duration) { +static int64_t metronom_got_spu_packet (metronom_t *this, int64_t pts) { int64_t vpts; pthread_mutex_lock (&this->lock); - if (pts) { - this->spu_vpts=pts; - } else { - pts=this->spu_vpts; - } - - if ( !this->in_discontinuity ) { - vpts = pts + this->vpts_offset; + if (pts >= 0 ) { + if ( !this->in_discontinuity ) { + vpts = pts + this->vpts_offset; + } else { + vpts = 0; + } } else { - vpts = 0; + /* pts < 0 */ + vpts = this->vpts_offset; } pthread_mutex_unlock (&this->lock); -- cgit v1.2.3