summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvan <[email protected]>2009-06-07 05:01:10 +0000
committervan <[email protected]>2009-06-07 05:01:10 +0000
commita4bc7d65af62d27c3b8d9a2f3c50f5938a46d9da (patch)
tree617ac735f2dc8c756de132ab9938189c68e7cf60
parent29a5aad80b27a47bec2dcb69bd97f06d38c64602 (diff)
- nasty bug: at eof, dropping a delay queue frame for CFR could link the render video output to the free list causing hangs and/or garbage output.
- since frame rate conversion moved from sync to render, sync has to use input (title) frame rate, not output (job) frame rate. - get rid of 'too many frames' check in sync. it can't be done here because it causes reader to deadlock and it belongs in the dvd reader anyway (only dvd input can loop). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2496 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/render.c1
-rw-r--r--libhb/sync.c17
2 files changed, 3 insertions, 15 deletions
diff --git a/libhb/render.c b/libhb/render.c
index 34928d906..894bdb0d0 100644
--- a/libhb/render.c
+++ b/libhb/render.c
@@ -226,6 +226,7 @@ static hb_buffer_t *delete_buffer_from_chain( hb_buffer_t **buf_out, hb_buffer_t
// found 'out' - remove it from the chain
pred->next = succ;
}
+ out->next = 0;
hb_buffer_close( &out );
return succ;
}
diff --git a/libhb/sync.c b/libhb/sync.c
index abcf11141..2043b9dd1 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -112,7 +112,7 @@ int syncInit( hb_work_object_t * w, hb_job_t * job )
else if( job->frame_to_stop )
{
/* Set the duration to a rough estimate */
- duration = ( job->frame_to_stop / ( job->vrate / job->vrate_base ) ) * 90000;
+ duration = ( job->frame_to_stop / ( title->rate / title->rate_base ) ) * 90000;
}
else
{
@@ -125,7 +125,7 @@ int syncInit( hb_work_object_t * w, hb_job_t * job )
duration += 90000;
/* 1 second safety so we're sure we won't miss anything */
}
- pv->count_frames_max = duration * job->vrate / job->vrate_base / 90000;
+ pv->count_frames_max = duration * title->rate / title->rate_base / 90000;
}
hb_log( "sync: expecting %d video frames", pv->count_frames_max );
@@ -745,19 +745,6 @@ static void SyncVideo( hb_work_object_t * w )
pv->count_frames, pv->busy );
return;
}
-
- /* Make sure we won't get more frames then expected */
- if( pv->count_frames >= pv->count_frames_max * 2)
- {
- hb_log( "sync: got too many frames (%d), exiting early",
- pv->count_frames );
-
- // Drop an empty buffer into our output to ensure that things
- // get flushed all the way out.
- hb_fifo_push( job->fifo_sync, hb_buffer_init( 0 ) );
- pv->busy &=~ 1;
- return;
- }
}
}