[FFmpeg-cvslog] r22010 - trunk/ffmpeg.c

michael subversion
Tue Feb 23 23:06:37 CET 2010


Author: michael
Date: Tue Feb 23 23:06:36 2010
New Revision: 22010

Log:
Set ist->pts to something that isnt guranteed to entangle itself with stream copying b frames.

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Tue Feb 23 22:03:25 2010	(r22009)
+++ trunk/ffmpeg.c	Tue Feb 23 23:06:36 2010	(r22010)
@@ -2090,8 +2090,10 @@ static int av_encode(AVFormatContext **o
 
     /* init pts */
     for(i=0;i<nb_istreams;i++) {
+        AVStream *st;
         ist = ist_table[i];
-        ist->pts = 0;
+        st= ist->st;
+        ist->pts = st->avg_frame_rate.num ? - st->codec->has_b_frames*AV_TIME_BASE / av_q2d(st->avg_frame_rate) : 0;
         ist->next_pts = AV_NOPTS_VALUE;
         ist->is_start = 1;
     }



More information about the ffmpeg-cvslog mailing list