diff options
author | jstebbins <[email protected]> | 2011-04-27 15:05:34 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-04-27 15:05:34 +0000 |
commit | 2d81a5ec8e0851b306b82eea9fead769ff6517b3 (patch) | |
tree | d8a03bbc25690f683b7e2bf4b879421ff9ae6dff /libhb/decvobsub.c | |
parent | 630a07e488b60f813332d7e740cbaf72ff8d33c1 (diff) |
Fix a problem with overlapping vobsubs
Since we now allow subtitles that overlap in time, it is no longer
appropriate to arbitrarily set the duration to 3 seconds when vobsubs
don't have an explicit stop time. This causes them to overlap on the display.
So now, we set the stop time for such vobsubs to -1. Then in sync adjust the
stop time to the start of the next vobsub when it is seen.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3961 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decvobsub.c')
-rw-r--r-- | libhb/decvobsub.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c index 102d7f0ce..9bd1b7808 100644 --- a/libhb/decvobsub.c +++ b/libhb/decvobsub.c @@ -208,7 +208,7 @@ static void ParseControls( hb_work_object_t * w ) int date, next; pv->pts_start = 0; - pv->pts_stop = 0; + pv->pts_stop = -1; pv->pts_forced = 0; pv->alpha[3] = 0; @@ -267,7 +267,7 @@ static void ParseControls( hb_work_object_t * w ) break; case 0x02: // 0x02 - STP_DSP - Stop Display, no arguments - if(!pv->pts_stop) + if(pv->pts_stop == -1) pv->pts_stop = pv->pts + date * 1024; break; @@ -343,7 +343,7 @@ static void ParseControls( hb_work_object_t * w ) } // fading-out - if( currAlpha < lastAlpha && !pv->pts_stop ) + if( currAlpha < lastAlpha && pv->pts_stop == -1 ) { pv->pts_stop = pv->pts + date * 1024; } @@ -377,12 +377,6 @@ static void ParseControls( hb_work_object_t * w ) } i = next; } - - if( !pv->pts_stop ) - { - /* Show it for 3 seconds */ - pv->pts_stop = pv->pts_start + 3 * 90000; - } } /*********************************************************************** |