changeset 19905:5a24682d9dd5

Set ReadOrder values for external subtitles.
author eugeni
date Tue, 19 Sep 2006 18:22:44 +0000
parents 640093581779
children f72c694ee566
files libass/ass.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass.c	Tue Sep 19 17:40:31 2006 +0000
+++ b/libass/ass.c	Tue Sep 19 18:22:44 2006 +0000
@@ -913,6 +913,7 @@
 {
 	char* buf;
 	ass_track_t* track;
+	int i;
 	
 	buf = read_file(fname);
 	if (!buf)
@@ -924,6 +925,10 @@
 	// process header
 	process_text(track, buf);
 
+	// external SSA/ASS subs does not have ReadOrder field
+	for (i = 0; i < track->n_events; ++i)
+		track->events[i].ReadOrder = i;
+
 	// there is no explicit end-of-font marker in ssa/ass
 	if (track->parser_priv->fontname)
 		decode_font(track);