diff options
author | johnallen <[email protected]> | 2007-01-09 01:46:52 +0000 |
---|---|---|
committer | johnallen <[email protected]> | 2007-01-09 01:46:52 +0000 |
commit | 79d69134a830eb4ffea1e1efe64e1cea26909265 (patch) | |
tree | 166c737e917e13d7a343621be1fcbce6159ec656 /libhb | |
parent | fa116cfe1e59bba16d9de76a0e39f401a2d91d5c (diff) |
Revert changes to threading sleep intervals.
Some users have issues with this.
It is less risky to not include this for release 0.7.2
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@100 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/hb.c | 2 | ||||
-rw-r--r-- | libhb/muxcommon.c | 9 | ||||
-rw-r--r-- | libhb/work.c | 14 |
3 files changed, 8 insertions, 17 deletions
diff --git a/libhb/hb.c b/libhb/hb.c index 977e3dc71..bdd2353d9 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -664,7 +664,7 @@ static void thread_func( void * _h ) hb_unlock( h->state_lock ); } - hb_snooze( 1000 ); + hb_snooze( 50 ); } if( h->work_thread ) diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index 99fe6fc91..70e384e8a 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -140,15 +140,10 @@ static void MuxerFunc( void * _mux ) if( !( track = GetTrack( list ) ) ) { hb_snooze( thread_sleep_interval ); - thread_sleep_interval += 1; +// thread_sleep_interval += 1; continue; } - thread_sleep_interval = MAX(1, (thread_sleep_interval - 1)); -#if 0 - if ((thread_sleep_interval <= 1) || (thread_sleep_interval > 100)) { - hb_log("%s: %d", "Muxer", thread_sleep_interval); - } -#endif +// thread_sleep_interval = MAX(1, (thread_sleep_interval - 1)); buf = hb_fifo_get( track->fifo ); if( job->pass != 1 ) diff --git a/libhb/work.c b/libhb/work.c index d1f2aaf5c..6529e2fbb 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -327,20 +327,16 @@ static void work_loop( void * _w ) hb_lock( job->pause ); hb_unlock( job->pause ); #endif - //if( hb_fifo_is_full( w->fifo_out ) || - if( (hb_fifo_percent_full( w->fifo_out ) > 0.8) || + if( hb_fifo_is_full( w->fifo_out ) || +// if( (hb_fifo_percent_full( w->fifo_out ) > 0.8) || !( buf_in = hb_fifo_get( w->fifo_in ) ) ) { hb_snooze( w->thread_sleep_interval ); - w->thread_sleep_interval += 1; +// w->thread_sleep_interval += 1; continue; } - w->thread_sleep_interval = MAX(1, (w->thread_sleep_interval - 1)); -#if 0 - if ((w->thread_sleep_interval <= 1) || (w->thread_sleep_interval > 100)) { - hb_log("%s: %d", w->name, w->thread_sleep_interval); - } -#endif +// w->thread_sleep_interval = MAX(1, (w->thread_sleep_interval - 1)); + w->work( w, &buf_in, &buf_out ); if( buf_in ) { |