Skip to content

Commit d31f1e2

Browse files
committed
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).
1 parent bef67b7 commit d31f1e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/video_compress/libavcodec.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,10 @@ void usage(bool full) {
456456
<< "' to display encoder specific options/examples; works\nfor "
457457
"decoders as well (use the keyword \"enc[oder]\", anyways).\n";
458458
col() << "\n";
459-
col() << "Libavcodec version (linked): " << SBOLD(LIBAVCODEC_IDENT) << "\n";
459+
const unsigned lavc_ver = avcodec_version();
460+
color_printf("Libavcodec version (linked): " TBOLD("%d.%d.%d") "\n",
461+
AV_VERSION_MAJOR(lavc_ver), AV_VERSION_MINOR(lavc_ver),
462+
AV_VERSION_MICRO(lavc_ver));
460463
const char *swscale = "no";
461464
#ifdef HAVE_SWSCALE
462465
swscale = "yes";

0 commit comments

Comments
 (0)