changeset 20229:cd827d62fb71

Fix timestamps for streams where kf_base gets negative
author rtogni
date Sun, 15 Oct 2006 13:35:46 +0000
parents 99ebe47a6295
children ef5f196c3a05
files libmpdemux/demux_real.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_real.c	Sun Oct 15 13:30:12 2006 +0000
+++ b/libmpdemux/demux_real.c	Sun Oct 15 13:35:46 2006 +0000
@@ -82,7 +82,7 @@
     int		current_vpacket;
     
     // timestamp correction:
-    unsigned int	kf_base;// timestamp of the prev. video keyframe
+    int64_t		kf_base;// timestamp of the prev. video keyframe
     unsigned int	kf_pts;	// timestamp of next video keyframe
     unsigned int	a_pts;	// previous audio timestamp
     double	v_pts;  // previous video timestamp
@@ -518,7 +518,7 @@
 //    if(pict_type==0)
     if(pict_type<=1){
       // I frame, sync timestamps:
-      priv->kf_base=timestamp-kf;
+      priv->kf_base=(int64_t)timestamp-kf;
       mp_msg(MSGT_DEMUX, MSGL_DBG2,"\nTS: base=%08X\n",priv->kf_base);
       kf=timestamp;
     } else {