summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2001-12-23 13:21:56 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2001-12-23 13:21:56 +0000
commit2c28b09c41ae4953f3ca6b950c16ac72529b4e53 (patch)
treef31878d650f86a18b2f5c83f0625ffbfd0863bc4
parenta98ab774ecbdf91d41f292149d8adabca3a95ed9 (diff)
downloadxine-lib-2c28b09c41ae4953f3ca6b950c16ac72529b4e53.tar.gz
xine-lib-2c28b09c41ae4953f3ca6b950c16ac72529b4e53.tar.bz2
spu vpts calculation may fallback using audio_wrap_offset
CVS patchset: 1291 CVS date: 2001/12/23 13:21:56
-rw-r--r--src/xine-engine/metronom.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c
index 4cbc3e89a..4b8bf85aa 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.42 2001/12/19 13:40:05 miguelfreitas Exp $
+ * $Id: metronom.c,v 1.43 2001/12/23 13:21:56 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -417,8 +417,15 @@ static uint32_t metronom_got_spu_packet (metronom_t *this, uint32_t pts,
detected but this->video_wrap_offset not updated (would give
wrong values too).
*/
- if (this->video_stream_starting || this->video_discontinuity) {
+ if ( this->video_stream_starting ) {
vpts = 0;
+ } else if ( this->video_discontinuity ) {
+ /* we can safely use audio_wrap_offset if already updated */
+ if( !this->audio_discontinuity ) {
+ vpts = pts + this->audio_wrap_offset;
+ } else {
+ vpts = 0;
+ }
} else {
vpts = pts + this->video_wrap_offset;
}