From: Rodeo Date: Wed, 21 Mar 2012 22:09:35 +0000 (+0000) Subject: Fix loop counter decrement in CFR frame duplication code. CFR would never duplicate... X-Git-Tag: 0.9.9~748 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1102f31fc74fb4a4ea9dd1fed13a8d071f6df384;p=handbrake Fix loop counter decrement in CFR frame duplication code. CFR would never duplicate a frame more than once, causing major A/V desync when the output framerate was over twice that of the input. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4523 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/render.c b/libhb/render.c index 641addbed..5fded023e 100644 --- a/libhb/render.c +++ b/libhb/render.c @@ -477,7 +477,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; - for ( ; excess_dur >= pv->frame_rate; excess_dur -= cfr_stop ) + for ( ; excess_dur >= pv->frame_rate; excess_dur -= pv->frame_rate ) { /* next frame too far ahead - dup current frame */ hb_buffer_t *dup = hb_buffer_init( out->size );