mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:21:11 +01:00
fftools/ffmpeg_enc: do not round frame durations prematurely
Changes the results of fate-idroq-video-encode and fate-lavf* tests, where different frames now get duplicated by framerate conversion code.
This commit is contained in:
parent
303f10d4dd
commit
9d4ca76c08
9 changed files with 23 additions and 23 deletions
|
|
@ -1030,11 +1030,11 @@ static void video_sync_process(OutputFile *of, OutputStream *ost,
|
|||
*nb_frames = 0;
|
||||
else if (delta > 0.6)
|
||||
e->next_pts = llrint(sync_ipts);
|
||||
frame->duration = duration;
|
||||
frame->duration = llrint(duration);
|
||||
break;
|
||||
case VSYNC_DROP:
|
||||
case VSYNC_PASSTHROUGH:
|
||||
frame->duration = duration;
|
||||
frame->duration = llrint(duration);
|
||||
e->next_pts = llrint(sync_ipts);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1112,7 +1112,7 @@ static int do_video_out(OutputFile *of, OutputStream *ost, AVFrame *frame)
|
|||
if (frame) {
|
||||
FrameData *fd = frame_data(frame);
|
||||
|
||||
duration = lrintf(frame->duration * av_q2d(frame->time_base) / av_q2d(enc->time_base));
|
||||
duration = frame->duration * av_q2d(frame->time_base) / av_q2d(enc->time_base);
|
||||
|
||||
if (duration <= 0 &&
|
||||
fd->frame_rate_filter.num > 0 && fd->frame_rate_filter.den > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue