From 1316df7aa98c4784f190d107206d0bb12c590b89 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 2 Jul 2015 19:04:59 +0200 Subject: lavu: add an API function to return the Libav version string This returns something like "v12_dev0-1332-g333a27c". This is much more useful than the individual library versions, of which there are too many, and which are very hard to map back to releases or git commits. Signed-off-by: Janne Grunau --- libavutil/avutil.h | 7 +++++++ libavutil/utils.c | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'libavutil') diff --git a/libavutil/avutil.h b/libavutil/avutil.h index f056415f09..688068eff8 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -163,6 +163,13 @@ */ unsigned avutil_version(void); +/** + * Return an informative version string. This usually is the actual release + * version number or a git commit description. This string has no fixed format + * and can change any time. It should never be parsed by code. + */ +const char *av_version_info(void); + /** * Return the libavutil build-time configuration. */ diff --git a/libavutil/utils.c b/libavutil/utils.c index c8c161dccb..8dcf3b6774 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -19,11 +19,18 @@ #include "config.h" #include "avutil.h" +#include "avversion.h" + /** * @file * various utility functions */ +const char *av_version_info(void) +{ + return LIBAV_VERSION; +} + unsigned avutil_version(void) { return LIBAVUTIL_VERSION_INT; -- cgit v1.2.3