[FFmpeg-cvslog] r9839 - trunk/libavformat/utils.c

michael subversion
Tue Jul 31 17:06:27 CEST 2007


Author: michael
Date: Tue Jul 31 17:06:27 2007
New Revision: 9839

Log:
deal with the case where one of pts,dts has wraped but the other has not


Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Tue Jul 31 17:06:27 2007
@@ -595,6 +595,11 @@ static void compute_pkt_fields(AVFormatC
     int num, den, presentation_delayed, delay, i;
     int64_t offset;
 
+    if(pkt->pts != AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && pkt->dts > pkt->pts && st->pts_wrap_bits<63
+       /*&& pkt->dts-(1LL<<st->pts_wrap_bits) < pkt->pts*/){
+        pkt->dts -= 1LL<<st->pts_wrap_bits;
+    }
+
     if (pkt->duration == 0) {
         compute_frame_duration(&num, &den, st, pc, pkt);
         if (den && num) {




More information about the ffmpeg-cvslog mailing list