diff options
author | jstebbins <[email protected]> | 2010-04-03 21:14:43 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-04-03 21:14:43 +0000 |
commit | 9de28e6ef25b02d4569a06293a941b1d874304d3 (patch) | |
tree | 0fda94962695504b7abff1826ded9a42715c6e38 /libhb/muxcommon.c | |
parent | b79e337bda086bc9721cb35754ae474c46e2e2bb (diff) |
fix silence insertion problem in audio sync and pipeline stall problem
the current audio buffer was being dropped when silence was inserted, causing
the time to fall even further behind and provoke more silence insertion
in some cases.
with pont-to-point, it is possible for one stream to complete before the
other(s). when the work_loop exits for that stream, the fifo is no longer
serviced and may fill. This can back up and cause a stall in reader
causing the streams that are not yet complete to stall. The Solution is
to continue servicing the fifo after work for a stream is complete. This was
complicated by the fact that the video sync work object was being used as the
indicator that all work was finished. When it exited everything was told
to stop. So now, the muxer work object (last in the chain) is the
indicator when work is done.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3197 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxcommon.c')
-rw-r--r-- | libhb/muxcommon.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index 1d27df64e..702285bba 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -385,6 +385,10 @@ static void mux_loop( void * _w ) } w->status = w->work( w, &buf_in, NULL ); + if( buf_in ) + { + hb_buffer_close( &buf_in ); + } } } @@ -445,8 +449,7 @@ hb_work_object_t * hb_muxer_init( hb_job_t * job ) muxer->private_data->track = mux->ntracks; muxer->fifo_in = job->fifo_mpeg4; add_mux_track( mux, job->mux_data, 1 ); - muxer->done = &job->done; - muxer->thread = hb_thread_init( muxer->name, mux_loop, muxer, HB_NORMAL_PRIORITY ); + muxer->done = &muxer->private_data->mux->done; for( i = 0; i < hb_list_count( title->list_audio ); i++ ) { |