Add a function to flush all events in a track and increment
LIBASS_VERSION to indicate the addition.
Initial patch by Aurelien Jacobs (aurel AT gnuage DOT org).
free(str);
}
+/**
+ * \brief Flush buffered events.
+ * \param track track
+*/
+void ass_flush_events(ASS_Track *track)
+{
+ if (track->events) {
+ int eid;
+ for (eid = 0; eid < track->n_events; eid++)
+ ass_free_event(track, eid);
+ track->n_events = 0;
+ }
+}
+
#ifdef CONFIG_ICONV
/** \brief recode buffer to utf-8
* constraint: codepage != 0
#include <stdarg.h>
#include "ass_types.h"
-#define LIBASS_VERSION 0x00909000
+#define LIBASS_VERSION 0x00910000
/*
* A linked list of images produced by an ass renderer.
void ass_process_chunk(ASS_Track *track, char *data, int size,
long long timecode, long long duration);
+/**
+ * \brief Flush buffered events.
+ * \param track track
+*/
+void ass_flush_events(ASS_Track *track);
+
/**
* \brief Read subtitles from file.
* \param library library handle