From fb5273985cf2f5ae2c84eb95e1f79c49a549e2e5 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sun, 3 Sep 2023 10:26:04 -0700 Subject: [PATCH] meson: include our local copy of libavutil uuid if ffmpeg is too old In the previous change, I added the uuid files. In this change, we check the libavutil version and if it's too old, we compile in our local copy. We have to change the include paths of the uuid code to find some other libavutil headers, but nothing beyond that. --- meson.build | 5 +++++ misc/uuid.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index ce1fce2b09..e015e6ef35 100644 --- a/meson.build +++ b/meson.build @@ -747,6 +747,11 @@ if features['uchardet'] dependencies += uchardet endif +features += {'lavu-uuid': libavutil.version().version_compare('>= 57.27.100')} +if not features['lavu-uuid'] + sources += files('misc/uuid.c') +endif + vapoursynth = dependency('vapoursynth', version: '>= 26', required: get_option('vapoursynth')) vapoursynth_script = dependency('vapoursynth-script', version: '>= 26', required: get_option('vapoursynth')) diff --git a/misc/uuid.c b/misc/uuid.c index 062e28736b..c739b3cf08 100644 --- a/misc/uuid.c +++ b/misc/uuid.c @@ -61,8 +61,8 @@ */ #include "uuid.h" -#include "error.h" -#include "avstring.h" +#include "libavutil/error.h" +#include "libavutil/avstring.h" int av_uuid_parse(const char *in, AVUUID uu) {