[FFmpeg-devel] [PATCH] Add FFMPEG_VERSION into the binary libs
This simplifies identifying from which revission a binary of a lib came from Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/utils.c |3 +++ libavformat/utils.c |3 +++ 2 files changed, 6 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 74bf6d5..d044bce 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -66,6 +66,9 @@ #include compat/os2threads.h #endif +#include libavutil/ffversion.h +char *av_codec_ffversion = FFmpeg version FFMPEG_VERSION; + #if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS static int default_lockmgr_cb(void **arg, enum AVLockOp op) { diff --git a/libavformat/utils.c b/libavformat/utils.c index a883745..43de42e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -53,6 +53,9 @@ #include riff.h #include url.h +#include libavutil/ffversion.h +char *av_format_ffversion = FFmpeg version FFMPEG_VERSION; + /** * @file * various utility functions for use within FFmpeg -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add FFMPEG_VERSION into the binary libs
On 12/19/14 10:05, Michael Niedermayer wrote: This simplifies identifying from which revission a binary of a lib came from Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/utils.c |3 +++ libavformat/utils.c |3 +++ 2 files changed, 6 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 74bf6d5..d044bce 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -66,6 +66,9 @@ #include compat/os2threads.h #endif +#include libavutil/ffversion.h +char *av_codec_ffversion = FFmpeg version FFMPEG_VERSION; Shouldn't that be const char * ? + #if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS static int default_lockmgr_cb(void **arg, enum AVLockOp op) { diff --git a/libavformat/utils.c b/libavformat/utils.c index a883745..43de42e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -53,6 +53,9 @@ #include riff.h #include url.h +#include libavutil/ffversion.h +char *av_format_ffversion = FFmpeg version FFMPEG_VERSION; + here too /** * @file * various utility functions for use within FFmpeg ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add FFMPEG_VERSION into the binary libs
On Fri, Dec 19, 2014 at 06:22:30PM +0100, Nicolas George wrote: Le nonidi 29 frimaire, an CCXXIII, Michael Niedermayer a écrit : +#include libavutil/ffversion.h +char *av_codec_ffversion = FFmpeg version FFMPEG_VERSION; This defines two variables: a pointer, and an anonymous const array of chars containing the string. Only the second one is needed, so I suggest: const char av_codec_ffversion[] = ...; changed all other issues fixed too applied thanks to all [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel