From 1b929afb2c564d9885583bf867b04f60f51122c9 Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Fri, 14 Oct 2022 11:22:54 +0200
Subject: [PATCH] Only set HAVE_LIBAVUTIL if libav is actually used
src/log.c uses av_log_set_level() and av_log_set_callback() from
libavutil if HAVE_LIBAVUTIL is set, so the libavutil dependence
must be added at the same time. Since libav logging is only used
by the h264 code, enable it all together for now.
---
meson.build | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 89a760e..94d0f6e 100644
--- a/meson.build
+++ b/meson.build
@@ -114,14 +114,11 @@ if gbm.found()
config.set('HAVE_GBM', true)
endif
-if libavutil.found()
- config.set('HAVE_LIBAVUTIL', true)
-endif
-
if gbm.found() and libdrm.found() and libavcodec.found() and libavfilter.found() and libavutil.found()
sources += [ 'src/h264-encoder.c', 'src/open-h264.c' ]
dependencies += [libdrm, libavcodec, libavfilter, libavutil]
config.set('ENABLE_OPEN_H264', true)
+ config.set('HAVE_LIBAVUTIL', true)
endif
configure_file(