diff options
author | van <[email protected]> | 2009-05-09 20:49:00 +0000 |
---|---|---|
committer | van <[email protected]> | 2009-05-09 20:49:00 +0000 |
commit | 8ac84c814d72983be3d3037c2b5491d2e3ea8832 (patch) | |
tree | 6a6ef1b52e6e65519ce8fce7e256cff847fbb609 | |
parent | d431f9bf102ddcc1f153e4f569e653df6cb11050 (diff) |
Fix another subtitle interleaving botch - for mkv's we want the subtitle in the cluster where it starts, not the cluster where it ends.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2409 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/muxcommon.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index 4d64b76f4..ea0104376 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -141,6 +141,12 @@ static hb_buffer_t *mf_pull( hb_track_t *track ) return b; } +static hb_buffer_t *mf_peek( hb_track_t *track ) +{ + return track->mf.out == track->mf.in ? + NULL : track->mf.fifo[track->mf.out & (track->mf.flen - 1)]; +} + static void MoveToInternalFifos( hb_mux_t *mux ) { int i; @@ -188,18 +194,12 @@ static void OutputTrackChunk( hb_mux_t *mux, hb_track_t *track, hb_mux_object_t { hb_buffer_t *buf; - while ( ( buf = mf_pull( track ) ) != NULL ) + while ( ( buf = mf_peek( track ) ) != NULL && buf->start < mux->pts ) { - m->mux( m, track->mux_data, buf ); + m->mux( m, track->mux_data, mf_pull( track ) ); track->frames += 1; track->bytes += buf->size; - - uint64_t pts = buf->stop; hb_buffer_close( &buf ); - if ( pts >= mux->pts ) - { - break; - } } } |