From f91126643a91c2d3f8d8e210c8facaf259951b03 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 30 Jun 2015 23:57:53 +0200 Subject: lavu: add an API function to return the FFmpeg version string This returns something like "N-73264-gb54ac84". This is much more useful than the individual library versions, of which there are too much and which are very hard to map back to releases or git commits. Signed-off-by: Michael Niedermayer --- libavutil/avutil.h | 7 +++++++ libavutil/utils.c | 5 +++++ 2 files changed, 12 insertions(+) (limited to 'libavutil') diff --git a/libavutil/avutil.h b/libavutil/avutil.h index e6ebb6c43c..eec2d559a7 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -170,6 +170,13 @@ */ unsigned avutil_version(void); +/** + * Return an informative version string. This usually the actual release version + * number and a git hash. This string has no fixed format and can change any + * time. It should never be parsed by code. + */ +const char *avutil_version_info(void); + /** * Return the libavutil build-time configuration. */ diff --git a/libavutil/utils.c b/libavutil/utils.c index 0b765ed0de..07bb3801c9 100644 --- a/libavutil/utils.c +++ b/libavutil/utils.c @@ -30,6 +30,11 @@ #include "libavutil/ffversion.h" const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION; +const char *avutil_version_info(void) +{ + return FFMPEG_VERSION; +} + unsigned avutil_version(void) { static int checks_done; -- cgit v1.2.3