summaryrefslogtreecommitdiffstats
path: root/libhb/render.c
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2008-02-16 16:17:17 +0000
committerjbrjake <[email protected]>2008-02-16 16:17:17 +0000
commit8e42af8351120e6ba7a43df3acab107b3a327bab (patch)
treece51e9a8a03ec2fbee69d2e0f02615662a796cfc /libhb/render.c
parent5ef3ec8029323e15ee87d6dc7b6c31258178f58b (diff)
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
Diffstat (limited to 'libhb/render.c')
-rw-r--r--libhb/render.c12
1 files changed, 10 insertions, 2 deletions
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 )
{