Commit fdbdd51b authored by michael's avatar michael

fix pts and keyframe flags for yuv4mpeg

fixes issue258


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11320 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 237764b1
......@@ -796,9 +796,7 @@ 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.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]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment