summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-04-12 18:23:36 +0000
committerjstebbins <[email protected]>2012-04-12 18:23:36 +0000
commit0fd986f2beea9368da33043a45c93eb962ba57e5 (patch)
treeda9409e2a704969c1b8e783c990e637028f7270a
parent4bf4a037b3603d83c47d911c394383915a2eca51 (diff)
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
-rw-r--r--libhb/render.c4
1 files changed, 3 insertions, 1 deletions
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;
}
}