From 0fd986f2beea9368da33043a45c93eb962ba57e5 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Thu, 12 Apr 2012 18:23:36 +0000 Subject: libhb: merge fix for overlapping start time bug in CFR mode to bugfix branch git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.9.x@4592 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libhb/render.c b/libhb/render.c index 5fded023e..bac205eb3 100644 --- a/libhb/render.c +++ b/libhb/render.c @@ -467,6 +467,7 @@ static void adjust_frame_rate( hb_work_private_t *pv, hb_buffer_t **buf_out ) if ( out->stop <= cfr_stop ) { out->stop = cfr_stop; + pv->out_last_stop = out->stop; } } else @@ -477,6 +478,7 @@ static void adjust_frame_rate( hb_work_private_t *pv, hb_buffer_t **buf_out ) // each of which is a frame time long. double excess_dur = (double)out->stop - cfr_stop; out->stop = cfr_stop; + pv->out_last_stop = out->stop; for ( ; excess_dur >= pv->frame_rate; excess_dur -= pv->frame_rate ) { /* next frame too far ahead - dup current frame */ @@ -487,12 +489,12 @@ static void adjust_frame_rate( hb_work_private_t *pv, hb_buffer_t **buf_out ) dup->start = cfr_stop; cfr_stop += pv->frame_rate; dup->stop = cfr_stop; + pv->out_last_stop = dup->stop; out = insert_buffer_in_chain( out, dup ); ++pv->dups; ++pv->count_frames; } } - pv->out_last_stop = out->stop; out = out->next; } } -- cgit v1.2.3