diff options
author | jstebbins <[email protected]> | 2011-12-22 16:36:51 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-12-22 16:36:51 +0000 |
commit | bb768a36a9a4e5736267f8722b240492fef0cac6 (patch) | |
tree | 1ee60354b48e1a40458b15dbebbed07caa92a1cb | |
parent | 6740c61c06849457c4b56066aab72a13fdc929da (diff) |
Fix overlapping vobsubs
vobsubs that don't have a stop time were persisting too long and being
displayed under the next vobsub in the video. We don't need to guess
the stop time of the vobsub. sync already handles unknown stop times
for subtitles.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4383 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/decvobsub.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c index fcada87d1..997f14e05 100644 --- a/libhb/decvobsub.c +++ b/libhb/decvobsub.c @@ -167,11 +167,14 @@ int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, pv->size_got = 0; pv->size_rle = 0; - // If we don't get a valid next timestamp, use the stop time - // of the current sub as the start of the next. - // This can happen if reader invalidates timestamps while - // waiting for an audio to update the SCR. - pv->pts = pv->pts_stop; + if ( pv->pts_stop != -1 ) + { + // If we don't get a valid next timestamp, use the stop time + // of the current sub as the start of the next. + // This can happen if reader invalidates timestamps while + // waiting for an audio to update the SCR. + pv->pts = pv->pts_stop; + } } return HB_WORK_OK; @@ -391,11 +394,6 @@ static void ParseControls( hb_work_object_t * w ) // Set pts to end of last sub if the start time is unknown. pv->pts_start = pv->pts; } - if( pv->pts_stop == -1 ) - { - // Set durtion to 10 sec if unknown. - pv->pts_stop = pv->pts + 90000L * 10; - } } /*********************************************************************** |