Commit ef5d68d3 authored by michael's avatar michael

-vsync 2 (drop frames if there are too many but dont duplicate any)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11934 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 54f26b2a
...@@ -733,6 +733,8 @@ static void do_video_out(AVFormatContext *s, ...@@ -733,6 +733,8 @@ static void do_video_out(AVFormatContext *s,
//FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c //FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c
if (vdelta < -1.1) if (vdelta < -1.1)
nb_frames = 0; nb_frames = 0;
else if (video_sync_method == 2)
ost->sync_opts= lrintf(get_sync_ipts(ost) / av_q2d(enc->time_base));
else if (vdelta > 1.1) else if (vdelta > 1.1)
nb_frames = lrintf(vdelta); nb_frames = lrintf(vdelta);
//fprintf(stderr, "vdelta:%f, ost->sync_opts:%"PRId64", ost->sync_ipts:%f nb_frames:%d\n", vdelta, ost->sync_opts, ost->sync_ipts, nb_frames); //fprintf(stderr, "vdelta:%f, ost->sync_opts:%"PRId64", ost->sync_ipts:%f nb_frames:%d\n", vdelta, ost->sync_opts, ost->sync_ipts, nb_frames);
......
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