summaryrefslogtreecommitdiff
path: root/src/xine-engine/metronom.c
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-04-24 20:26:06 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-04-24 20:26:06 +0000
commit5193fe68baca652e1b8fd978f0b3387395f54f36 (patch)
tree1c572f61dfdfe7f5ff572166444b6879b547bd6a /src/xine-engine/metronom.c
parent62748bd5ed5f8302cc81fdcdb2c8dc25ee863d9c (diff)
downloadxine-lib-5193fe68baca652e1b8fd978f0b3387395f54f36.tar.gz
xine-lib-5193fe68baca652e1b8fd978f0b3387395f54f36.tar.bz2
Some more adjustments to make dvd menus work better.
CVS patchset: 1774 CVS date: 2002/04/24 20:26:06
Diffstat (limited to 'src/xine-engine/metronom.c')
-rw-r--r--src/xine-engine/metronom.c22
1 files changed, 10 insertions, 12 deletions
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);