diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-19 00:45:41 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-19 00:45:41 +0000 |
commit | 7580770c5ff6df373c6056626abae7328ae5ab48 (patch) | |
tree | e24f050292d6562a6b169cacba4f294895105cd0 /src/xine-engine/metronom.c | |
parent | 1667cd964d92d9c7f7f53ff7f5343cafd08c3249 (diff) | |
download | xine-lib-7580770c5ff6df373c6056626abae7328ae5ab48.tar.gz xine-lib-7580770c5ff6df373c6056626abae7328ae5ab48.tar.bz2 |
spu and overlay cleanups, mostly cosmetic
CVS patchset: 3298
CVS date: 2002/11/19 00:45:41
Diffstat (limited to 'src/xine-engine/metronom.c')
-rw-r--r-- | src/xine-engine/metronom.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index 78b044b05..a8ab454b6 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.100 2002/11/12 18:40:54 miguelfreitas Exp $ + * $Id: metronom.c,v 1.101 2002/11/19 00:45:42 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -264,13 +264,14 @@ static int64_t metronom_got_spu_packet (metronom_t *this, int64_t pts) { pthread_mutex_lock (&this->lock); - if (pts >= 0 ) { - vpts = pts + this->vpts_offset; - } else { - /* pts < 0 */ - vpts = this->vpts_offset; - } - + vpts = pts + this->vpts_offset; + + /* no vpts going backwards please */ + if( vpts < this->spu_vpts ) + vpts = this->spu_vpts; + + this->spu_vpts = vpts; + pthread_mutex_unlock (&this->lock); return vpts; } |