From c4e1889f6131af3589e967f40506d02d87642911 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Nov 2013 23:59:04 +0100 Subject: Add ass_library_version() Based on the patch by chadr123. See google code issue #113. --- libass/ass.c | 5 +++++ libass/ass.h | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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 #include "ass_types.h" -#define LIBASS_VERSION 0x01020000 +#define LIBASS_VERSION 0x01030000 /* * A linked list of images produced by an ass renderer. @@ -87,6 +87,13 @@ typedef enum { ASS_SHAPING_COMPLEX } 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 -- cgit v1.2.3