summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-02-14 18:53:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-02-14 18:53:12 +0000
commit880add3743cebb080d82591aa77f43caa1740bc0 (patch)
tree9aefb8c3178a64deeb547fc729260f1abac07df4 /ffmpeg.c
parent3f8e1fc80c539f3f0d20731046b8de9f6fda1039 (diff)
-vsync 2 (drop frames if there are too many but do not duplicate any)
Originally committed as revision 11934 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index fad0852c14..65cc3f4c3f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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
if (vdelta < -1.1)
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)
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);