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

michael subversion
Tue Jun 3 02:43:56 CEST 2008


Author: michael
Date: Tue Jun  3 02:43:56 2008
New Revision: 13639

Log:
Do not set pts in update_initial_durations() if stream has b frames.


Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Tue Jun  3 02:43:56 2008
@@ -645,7 +645,9 @@ static void update_initial_durations(AVF
             continue;
         if(pktl->pkt.pts == pktl->pkt.dts && pktl->pkt.dts == AV_NOPTS_VALUE
            && !pktl->pkt.duration){
-            pktl->pkt.pts= pktl->pkt.dts= st->cur_dts;
+            pktl->pkt.dts= st->cur_dts;
+            if(!st->codec->has_b_frames)
+                pktl->pkt.pts= st->cur_dts;
             st->cur_dts += pkt->duration;
             pktl->pkt.duration= pkt->duration;
         }else




More information about the ffmpeg-cvslog mailing list