From d0bbce5af9df99bf309edb88d69a07d129ca3e7b Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 24 Mar 2025 16:53:48 +0100 Subject: [PATCH] vcomp/lavc version: print ver from run-time linked Do print the runtime lavc version instead the one from headers, that may differ (minor and patch only). --- src/video_compress/libavcodec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index f36b33ad7..e7ebbfe99 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -433,7 +433,10 @@ void usage(bool full) { } col() << "\nUse '" << SBOLD("-c libavcodec:encoder=:help") << "' to display encoder specific options, works on decoders as well (also use keyword \"encoder\").\n"; col() << "\n"; - col() << "Libavcodec version (linked): " << SBOLD(LIBAVCODEC_IDENT) << "\n"; + const unsigned lavc_ver = avcodec_version(); + color_printf("Libavcodec version (linked): " TBOLD("%d.%d.%d") "\n", + AV_VERSION_MAJOR(lavc_ver), AV_VERSION_MINOR(lavc_ver), + AV_VERSION_MICRO(lavc_ver)); const char *swscale = "no"; #ifdef HAVE_SWSCALE swscale = "yes";