diff options
author | van <[email protected]> | 2009-05-11 07:12:39 +0000 |
---|---|---|
committer | van <[email protected]> | 2009-05-11 07:12:39 +0000 |
commit | a6dff4f74959acdc9d1f39cce2314a1d258c702a (patch) | |
tree | 59ab1f90f7f80bed5fe9d63ddecd783b70924fbb /libhb/muxcommon.c | |
parent | 8ac84c814d72983be3d3037c2b5491d2e3ea8832 (diff) |
Another subtitle muxing fix: Don't check the rdy bit before calling OutputTrackChunk so subtitles get output as early as possible based on their start time rather than just before their stop time. (rdy is still checked for non-subtitle tracks since their rdy bit is in the allRdy mask that's tested in the outer loop.)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2410 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxcommon.c')
-rw-r--r-- | libhb/muxcommon.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index ea0104376..a404911af 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -285,21 +285,18 @@ static void MuxerFunc( void * _mux ) { for ( i = 0; i < mux->ntracks; ++i ) { - if ( mux->rdy & (1 << i) ) + track = mux->track[i]; + OutputTrackChunk( mux, track, m ); + + // if the track is at eof or still has data that's past + // our next interleave point then leave it marked as rdy. + // Otherwise clear rdy. + if ( ( mux->eof & (1 << i) ) == 0 && + ( track->mf.out == track->mf.in || + track->mf.fifo[(track->mf.in-1) & (track->mf.flen-1)]->stop + < mux->pts + mux->interleave ) ) { - track = mux->track[i]; - OutputTrackChunk( mux, track, m ); - - // if the track is at eof or still has data that's past - // our next interleave point then leave it marked as rdy. - // Otherwise clear rdy. - if ( ( mux->eof & (1 << i) ) == 0 && - ( track->mf.out == track->mf.in || - track->mf.fifo[(track->mf.in-1) & (track->mf.flen-1)]->stop - < mux->pts + mux->interleave ) ) - { - mux->rdy &=~ ( 1 << i ); - } + mux->rdy &=~ ( 1 << i ); } } @@ -330,13 +327,12 @@ finished: struct stat sb; uint64_t bytes_total, frames_total; -#define p state.param.muxing /* Update the UI */ hb_state_t state; - state.state = HB_STATE_MUXING; - p.progress = 0; + state.state = HB_STATE_MUXING; + state.param.muxing.progress = 0; hb_set_state( job->h, &state ); -#undef p + if( m ) { m->end( m ); |