summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-03-12 11:04:06 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-03-12 11:04:06 +0000
commit995d0f7e8a08bb813c24a49d5bae681d5585fb8c (patch)
tree130886617dd5422ab3548572c335697708d5c265 /src
parenteaed2e8e8143e119ba09966860e0165bedcf6414 (diff)
downloadxine-lib-995d0f7e8a08bb813c24a49d5bae681d5585fb8c.tar.gz
xine-lib-995d0f7e8a08bb813c24a49d5bae681d5585fb8c.tar.bz2
minor corrections and a patch for metronom to make sure it doesn't compensate drifts forever
CVS patchset: 1563 CVS date: 2002/03/12 11:04:06
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_avi.c4
-rw-r--r--src/xine-engine/buffer.c6
-rw-r--r--src/xine-engine/buffer_types.c7
-rw-r--r--src/xine-engine/metronom.c17
4 files changed, 19 insertions, 15 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index e3ce6013b..ebaf9f8e1 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.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: demux_avi.c,v 1.66 2002/03/11 23:43:58 guenter Exp $
+ * $Id: demux_avi.c,v 1.67 2002/03/12 11:04:06 guenter Exp $
*
* demultiplexer for avi streams
*
@@ -1039,7 +1039,7 @@ static void demux_avi_start (demux_plugin_t *this_gen,
return;
}
buf->type = this->avi->video_type;
- LOG_MSG(this->xine, _("demux_avi: video codec >%s<\n"), buf_video_name(buf->type));
+ LOG_MSG(this->xine, _("demux_avi: video codec '%s'\n"), buf_video_name(buf->type));
this->video_fifo->put (this->video_fifo, buf);
diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c
index 41278d48e..cb1dee715 100644
--- a/src/xine-engine/buffer.c
+++ b/src/xine-engine/buffer.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000-2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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: buffer.c,v 1.14 2002/03/11 00:00:08 f1rmb Exp $
+ * $Id: buffer.c,v 1.15 2002/03/12 11:04:07 guenter Exp $
*
*
* contents:
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index fab61fa2f..7cdd19f06 100644
--- a/src/xine-engine/buffer_types.c
+++ b/src/xine-engine/buffer_types.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000-2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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: buffer_types.c,v 1.11 2002/03/11 12:31:26 guenter Exp $
+ * $Id: buffer_types.c,v 1.12 2002/03/12 11:04:07 guenter Exp $
*
*
* contents:
@@ -67,6 +67,7 @@ static video_db_t video_db[] = {
},
{
{
+ mmioFOURCC('D', 'X', '5', '0'),
mmioFOURCC('D', 'I', 'V', 'X'),
mmioFOURCC('d', 'i', 'v', 'x'),
mmioFOURCC('D', 'i', 'v', 'x'),
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c
index 7b2a544f6..adfba2f77 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.66 2002/03/12 01:35:54 miguelfreitas Exp $
+ * $Id: metronom.c,v 1.67 2002/03/12 11:04:07 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -367,11 +367,7 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
} else {
- /* this will fix video drift with a constant compensation each
- frame for about 1 second of video. since a valid pts must
- happen before that the difference will be recalculated,
- resulting in a new (smaller) video_drift value. */
- this->video_drift = diff/30;
+ this->video_drift = diff;
#ifdef LOG
if (diff)
@@ -388,7 +384,14 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
(this->video_drift<0)?'+':'-', abs(this->video_drift) );
#endif
- img->duration -= this->video_drift;
+ /* this will fix video drift with a constant compensation each
+ frame for about 1 second of video. */
+ img->duration -= this->video_drift/30;
+ if (this->video_drift)
+ this->video_drift -= this->video_drift / 30;
+ if (this->video_drift<0)
+ this->video_drift = 0;
+
this->video_vpts += img->duration;
pthread_mutex_unlock (&this->lock);