changeset 19639:bbe600db7b83

Don't sort events when reading external subs. With r19644, the order does not matter.
author eugeni
date Sat, 02 Sep 2006 19:21:40 +0000
parents a3473d990fed
children 521f71200591
files libass/ass.c
diffstat 1 files changed, 0 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass.c	Sat Sep 02 19:17:32 2006 +0000
+++ b/libass/ass.c	Sat Sep 02 19:21:40 2006 +0000
@@ -121,23 +121,6 @@
 		free(style->FontName);
 }
 
-static int events_compare_f(const void* a_, const void* b_) {
-	ass_event_t* a = (ass_event_t*)a_;
-	ass_event_t* b = (ass_event_t*)b_;
-	if (a->Start < b->Start)
-		return -1;
-	else if (a->Start > b->Start)
-		return 1;
-	else
-		return 0;
-}
-
-/// \brief Sort events by start time
-/// \param tid track id
-static void sort_events(ass_track_t* track) {
-	qsort(track->events, track->n_events, sizeof(ass_event_t), events_compare_f);
-}
-
 // ==============================================================================================
 
 static void skip_spaces(char** str) {
@@ -943,8 +926,6 @@
 
 	mp_msg(MSGT_GLOBAL, MSGL_INFO, "LIBASS: added subtitle file: %s (%d styles, %d events)\n", fname, track->n_styles, track->n_events);
 	
-	sort_events(track);
-		
 //	dump_events(forced_tid);
 	return track;
 }