diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-07-25 09:30:56 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-07-25 09:30:56 +0000 |
commit | 8300609b78f70220b4d6c3c285070f0ca9fe5e3d (patch) | |
tree | 76055582fa7d3b823c134e870036146413d1f156 /ffmpeg.c | |
parent | a9aeda81e72fdc7c457645b231b7b05040944517 (diff) | |
download | ffmpeg-8300609b78f70220b4d6c3c285070f0ca9fe5e3d.tar.gz |
multi frame duplication fix
Originally committed as revision 3338 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -678,16 +678,16 @@ static void do_video_out(AVFormatContext *s, if (vdelta < -1.1) nb_frames = 0; else if (vdelta > 1.1) - nb_frames = 2; + nb_frames = lrintf(vdelta - 1.1 + 0.5); //fprintf(stderr, "vdelta:%f, ost->sync_opts:%lld, ost->sync_ipts:%f nb_frames:%d\n", vdelta, ost->sync_opts, ost->sync_ipts, nb_frames); if (nb_frames == 0){ ++nb_frames_drop; if (verbose>2) fprintf(stderr, "*** drop!\n"); - }else if (nb_frames == 2) { - ++nb_frames_dup; + }else if (nb_frames > 1) { + nb_frames_dup += nb_frames; if (verbose>2) - fprintf(stderr, "*** dup!\n"); + fprintf(stderr, "*** %d dup!\n", nb_frames-1); } }else ost->sync_opts= lrintf(ost->sync_ipts * enc->frame_rate / enc->frame_rate_base); |