summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/metronom.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c
index c3b1dadf9..6a872e5aa 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.21 2001/08/26 09:32:38 jcdutton Exp $
+ * $Id: metronom.c,v 1.22 2001/08/26 09:38:23 jcdutton Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -78,18 +78,15 @@ static void unixscr_set_pivot (unixscr_t *this) {
double pts_calc;
gettimeofday(&tv, NULL);
-
pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor;
pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6;
-
pts = this->cur_pts + pts_calc;
+
/* This next part introduces a one off inaccuracy
* to the scr due to rounding tv to pts.
*/
this->cur_time.tv_sec=tv.tv_sec;
this->cur_time.tv_usec=tv.tv_usec;
- printf("Old:New PTS=%d:%d\n",this->cur_pts,pts);
-
this->cur_pts=pts;
return ;
@@ -99,6 +96,7 @@ static int unixscr_set_speed (scr_plugin_t *scr, int speed) {
unixscr_t *this = (unixscr_t*) scr;
pthread_mutex_lock (&this->lock);
+
unixscr_set_pivot( this );
this->speed_factor = (double) speed * 90000.0 / 4.0;