summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authoreddyg <[email protected]>2008-02-26 00:51:49 +0000
committereddyg <[email protected]>2008-02-26 00:51:49 +0000
commit765e830b3a5512812507ba007460357d093f8a67 (patch)
tree7c47d481735a9a13c68d2bc8e652c77972a36967 /libhb
parentba18c96e06f6b5f40f772c439405df58ec55001e (diff)
Set an minimum subtitle display time of three seconds *or* until the next subtitle is displayed. This makes subtitles easier to read for the slow readers or for the DVD authors why display the subtitles for too short a period (e.g. only display the subtitles during the talking in a fast speaking tongue).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1317 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/sync.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libhb/sync.c b/libhb/sync.c
index 78252fb27..04bdf162f 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -463,6 +463,26 @@ static int SyncVideo( hb_work_object_t * w )
*
* fall through to display
*/
+ if( ( sub->stop - sub->start ) < ( 3 * 90000 ) )
+ {
+ /*
+ * Subtitle is on for less than three seconds, extend
+ * the time that it is displayed to make it easier
+ * to read. Make it 3 seconds or until the next
+ * subtitle is displayed.
+ *
+ * This is in response to Indochine which only
+ * displays subs for 1 second - too fast to read.
+ */
+ sub->stop = sub->start + ( 3 * 90000 );
+
+ sub2 = hb_fifo_see2( pv->subtitle->fifo_raw );
+
+ if( sub2 && sub->stop > sub2->start )
+ {
+ sub->stop = sub2->start;
+ }
+ }
}
else
{