changeset 5828:880008901169

frame-based mpsub parser fix - patch by Rizsanyi Zsolt <rizsanyi@myrealbox.com>
author arpi
date Thu, 25 Apr 2002 12:59:24 +0000
parents 9907037223fb
children 21935594d592
files subreader.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Thu Apr 25 12:29:55 2002 +0000
+++ b/subreader.c	Thu Apr 25 12:59:24 2002 +0000
@@ -404,9 +404,9 @@
 		if (!fgets(line, LINE_LEN, fd)) return NULL;
 	} while (sscanf (line, "%f %f", &a, &b) !=2);
 
-	mpsub_position += (a*100.0);
+	mpsub_position += a*(sub_uses_time ? 100.0 : 1.0);
 	current->start=(int) mpsub_position;
-	mpsub_position += (b*100.0);
+	mpsub_position += b*(sub_uses_time ? 100.0 : 1.0);
 	current->end=(int) mpsub_position;
 
 	while (num < SUB_MAX_TEXT) {