summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-05 00:03:35 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-05 00:03:35 +0000
commit268b2c1a0f689af9ea58336368286c1f5e1f3f72 (patch)
treedd21a032873d9b76cc79014c09f2057b38dd1186 /subreader.c
parent7228f67795c10a8e9a0bf633efa3bba7da79551f (diff)
downloadmpv-268b2c1a0f689af9ea58336368286c1f5e1f3f72.tar.bz2
mpv-268b2c1a0f689af9ea58336368286c1f5e1f3f72.tar.xz
overlapping subtitles support is now optional, can be disabled (-nooverlapsub)
patch by Salvatore Falco <sfalco@studenti.ing.uniroma1.it> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8362 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c
index 3e374c26f9..deb55bb52c 100644
--- a/subreader.c
+++ b/subreader.c
@@ -1048,7 +1048,7 @@ subtitle* sub_read_file (char *filename, float fps) {
}
adjust_subs_time(first, 6.0, fps, 0); /* ~6 secs AST */
-
+if(suboverlap_enabled){
// here we manage overlapping subtitles
sub_orig = sub_num;
n_first = sub_num;
@@ -1057,7 +1057,7 @@ subtitle* sub_read_file (char *filename, float fps) {
second = NULL;
// for each subtitle in first[]
for (sub_first = 0; sub_first < n_first; ++sub_first) {
- while (first[sub_first].start <= first[sub_first].end) {
+ while (first[sub_first].start < first[sub_first].end) {
unsigned long end_time = first[sub_first].end;
int lines_to_add = 0, sub_to_add, event, ls, lf;
@@ -1144,6 +1144,11 @@ subtitle* sub_read_file (char *filename, float fps) {
}
return second;
+} else { //if(suboverlap_enabled)
+ adjust_subs_time(first, 6.0, fps, 1); /* ~6 secs AST */
+
+ return first;
+}
}
#if 0