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

michael subversion
Wed Dec 26 21:38:29 CET 2007


Author: michael
Date: Wed Dec 26 21:38:28 2007
New Revision: 11320

Log:
fix pts and keyframe flags for yuv4mpeg
fixes issue258


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Wed Dec 26 21:38:28 2007
@@ -796,10 +796,8 @@ static void do_video_out(AVFormatContext
             enc->coded_frame = dec->coded_frame; //FIXME/XXX remove this hack
             pkt.data= (uint8_t *)final_picture;
             pkt.size=  sizeof(AVPicture);
-            if(dec->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
-                pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
-            if(dec->coded_frame && dec->coded_frame->key_frame)
-                pkt.flags |= PKT_FLAG_KEY;
+            pkt.pts= av_rescale_q(ost->sync_opts, enc->time_base, ost->st->time_base);
+            pkt.flags |= PKT_FLAG_KEY;
 
             write_frame(s, &pkt, ost->st->codec, bitstream_filters[ost->file_index][pkt.stream_index]);
             enc->coded_frame = old_frame;




More information about the ffmpeg-cvslog mailing list