summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-12-26 20:38:28 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-12-26 20:38:28 +0000
commitb4dba580f9314906ee122e8e99936b8ffdf0afb3 (patch)
tree14128dcb017b539494e8856ba307ea44aeb5d1d3 /ffmpeg.c
parentd6bb52acdcde23fa4e4094a30f4a38dcab123e0d (diff)
fix pts and keyframe flags for yuv4mpeg
fixes issue258 Originally committed as revision 11320 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 3ed642f5fa..9a990a382f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -796,10 +796,8 @@ static void do_video_out(AVFormatContext *s,
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;