From 8e42af8351120e6ba7a43df3acab107b3a327bab Mon Sep 17 00:00:00 2001 From: jbrjake Date: Sat, 16 Feb 2008 16:17:17 +0000 Subject: Fixes crashes with 2-pass when b-frames are enabled, by only using the delay_queue in render.c to actually delay frames when VFR is enabled. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1271 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/render.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libhb') diff --git a/libhb/render.c b/libhb/render.c index 24a3d504e..76d0f4f07 100644 --- a/libhb/render.c +++ b/libhb/render.c @@ -406,10 +406,18 @@ int renderWork( hb_work_object_t * w, hb_buffer_t ** buf_in, * Keep the last three frames in our queue, this ensures that we have the last * two always in there should we need to rewrite the durations on them. */ - if( hb_fifo_size( pv->delay_queue ) >= 3 ) + + if( job->vfr ) + { + if( hb_fifo_size( pv->delay_queue ) >= 3 ) + { + *buf_out = hb_fifo_get( pv->delay_queue ); + } + } + else { *buf_out = hb_fifo_get( pv->delay_queue ); - } + } if( *buf_out ) { -- cgit v1.2.3