mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 05:50:43 +00:00
multi frame duplication fix
Originally committed as revision 3338 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a9aeda81e7
commit
8300609b78
8
ffmpeg.c
8
ffmpeg.c
@ -678,16 +678,16 @@ static void do_video_out(AVFormatContext *s,
|
|||||||
if (vdelta < -1.1)
|
if (vdelta < -1.1)
|
||||||
nb_frames = 0;
|
nb_frames = 0;
|
||||||
else if (vdelta > 1.1)
|
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);
|
//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){
|
if (nb_frames == 0){
|
||||||
++nb_frames_drop;
|
++nb_frames_drop;
|
||||||
if (verbose>2)
|
if (verbose>2)
|
||||||
fprintf(stderr, "*** drop!\n");
|
fprintf(stderr, "*** drop!\n");
|
||||||
}else if (nb_frames == 2) {
|
}else if (nb_frames > 1) {
|
||||||
++nb_frames_dup;
|
nb_frames_dup += nb_frames;
|
||||||
if (verbose>2)
|
if (verbose>2)
|
||||||
fprintf(stderr, "*** dup!\n");
|
fprintf(stderr, "*** %d dup!\n", nb_frames-1);
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
ost->sync_opts= lrintf(ost->sync_ipts * enc->frame_rate / enc->frame_rate_base);
|
ost->sync_opts= lrintf(ost->sync_ipts * enc->frame_rate / enc->frame_rate_base);
|
||||||
|
Loading…
Reference in New Issue
Block a user