diff options
author | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-15 13:35:46 +0000 |
---|---|---|
committer | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-15 13:35:46 +0000 |
commit | 5ec2b9ca3a2bb744f2feefd91ff189df16441a38 (patch) | |
tree | c8a50bf3478518799e7e300ebdcb90ee7b4044fc | |
parent | 8f0d8b9538a272e4148695ddec6588fd2d7598d1 (diff) | |
download | mpv-5ec2b9ca3a2bb744f2feefd91ff189df16441a38.tar.bz2 mpv-5ec2b9ca3a2bb744f2feefd91ff189df16441a38.tar.xz |
Fix timestamps for streams where kf_base gets negative
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20235 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_real.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index 9f417e4fee..07747b6dbd 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -82,7 +82,7 @@ typedef struct { 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 @@ static double real_fix_timestamp(real_priv_t* priv, unsigned char* s, unsigned i // 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 { |