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.
Unified · Split
| @@ -15,6 +15,9 @@ libavutil: 2014-08-09 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2015-xx-xx - xxxxxx - lavu 53.xx.100 | |
| 19 | + Add avutil_version_info(). | |
| 20 | + | |
| 18 | 21 | -------- 8< --------- FFmpeg 2.7 was cut here -------- 8< --------- |
| 19 | 22 | |
| 20 | 23 | 2015-06-04 - cc17b43 - lswr 1.2.100 |
| @@ -170,6 +170,13 @@ · 169 unmodified lines | ||
| 170 | 170 | */ |
| 171 | 171 | unsigned avutil_version(void); |
| 172 | 172 | |
| 173 | +/** | |
| 174 | + * Return an informative version string. This usually the actual release version | |
| 175 | + * number and a git hash. This string has no fixed format and can change any | |
| 176 | + * time. It should never be parsed by code. | |
| 177 | + */ | |
| 178 | +const char *avutil_version_info(void); | |
| 179 | + | |
| 173 | 180 | /** |
| 174 | 181 | * Return the libavutil build-time configuration. |
| 175 | 182 | */ |
| @@ -30,6 +30,11 @@ · 29 unmodified lines | ||
| 30 | 30 | #include "libavutil/ffversion.h" |
| 31 | 31 | const char av_util_ffversion[] = "FFmpeg version " FFMPEG_VERSION; |
| 32 | 32 | |
| 33 | +const char *avutil_version_info(void) | |
| 34 | +{ | |
| 35 | + return FFMPEG_VERSION; | |
| 36 | +} | |
| 37 | + | |
| 33 | 38 | unsigned avutil_version(void) |
| 34 | 39 | { |
| 35 | 40 | static int checks_done; |