summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-25 23:59:04 +0100
committerwm4 <wm4@nowhere>2013-11-25 23:59:04 +0100
commitc4e1889f6131af3589e967f40506d02d87642911 (patch)
tree7cd10e6d0c57d85bf1f2ae7916a471b6c0cd1128
parent516f0eadac78255df58368d2c9cb9b200ae0ff64 (diff)
downloadlibass-c4e1889f6131af3589e967f40506d02d87642911.tar.bz2
libass-c4e1889f6131af3589e967f40506d02d87642911.tar.xz
Add ass_library_version()
Based on the patch by chadr123. See google code issue #113.
-rw-r--r--libass/ass.c5
-rw-r--r--libass/ass.h9
2 files changed, 13 insertions, 1 deletions
diff --git a/libass/ass.c b/libass/ass.c
index 19e1b53..c2e0bfa 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -59,6 +59,11 @@ struct parser_priv {
#define ASS_STYLES_ALLOC 20
#define ASS_EVENTS_ALLOC 200
+int ass_library_version(void)
+{
+ return LIBASS_VERSION;
+}
+
void ass_free_track(ASS_Track *track)
{
int i;
diff --git a/libass/ass.h b/libass/ass.h
index cb85a2c..e7c2ade 100644
--- a/libass/ass.h
+++ b/libass/ass.h
@@ -23,7 +23,7 @@
#include <stdarg.h>
#include "ass_types.h"
-#define LIBASS_VERSION 0x01020000
+#define LIBASS_VERSION 0x01030000
/*
* A linked list of images produced by an ass renderer.
@@ -88,6 +88,13 @@ typedef enum {
} ASS_ShapingLevel;
/**
+ * \brief Return the version of library. This returns the value LIBASS_VERSION
+ * was set to when the library was compiled.
+ * \return library version
+ */
+int ass_library_version(void);
+
+/**
* \brief Initialize the library.
* \return library handle or NULL if failed
*/