This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit f212f5736c5d9b6af9b98295d87994c02bf0fbf4 Author: Kacper Michajłow <[email protected]> AuthorDate: Mon Sep 7 03:35:54 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Sat Sep 12 23:52:20 2026 +0000 compat/android: provide log2 and log2f below API level 18 Bionic gained log2 and log2f in Android 4.3, API level 18. Devices below that are under 0.1 percent of the installed base, Google Play services dropped them in 2021 and no NDK newer than r24 can target them. VLC 3 however still ships Android 4.2 builds with NDK 21 against current FFmpeg releases, so provide the two functions for that case rather than keeping generic fallbacks for the whole libm. Signed-off-by: Kacper Michajłow <[email protected]> --- libavformat/lrc.h => compat/android/math.h | 17 +++++++++-------- fftools/textformat/avtextformat.c | 1 + libavutil/internal.h | 4 ++++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libavformat/lrc.h b/compat/android/math.h similarity index 75% copy from libavformat/lrc.h copy to compat/android/math.h index 0297bc1eb1..6178f6be4a 100644 --- a/libavformat/lrc.h +++ b/compat/android/math.h @@ -1,7 +1,4 @@ /* - * LRC lyrics file format decoder - * Copyright (c) 2014 StarBrilliant <[email protected]> - * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or @@ -19,11 +16,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVFORMAT_LRC_H -#define AVFORMAT_LRC_H - -#include "metadata.h" +#ifndef COMPAT_ANDROID_MATH_H +#define COMPAT_ANDROID_MATH_H -extern const AVMetadataConv ff_lrc_metadata_conv[]; +#include <math.h> +#include <android/api-level.h> +#if __ANDROID_API__ < 18 +#define log2(x) (log(x) * M_LOG2E) +#define log2f(x) (logf(x) * (float)M_LOG2E) #endif + +#endif /* COMPAT_ANDROID_MATH_H */ diff --git a/fftools/textformat/avtextformat.c b/fftools/textformat/avtextformat.c index 104137226b..de93b012ff 100644 --- a/fftools/textformat/avtextformat.c +++ b/fftools/textformat/avtextformat.c @@ -33,6 +33,7 @@ #include "libavutil/common.h" #include "libavutil/error.h" #include "libavutil/hash.h" +#include "libavutil/internal.h" #include "libavutil/macros.h" #include "libavutil/opt.h" #include "avtextformat.h" diff --git a/libavutil/internal.h b/libavutil/internal.h index 88a4d29f2c..59cb0c2724 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -68,6 +68,10 @@ #endif +#ifdef __ANDROID__ +# include "compat/android/math.h" +#endif + #define FF_ALLOC_TYPED_ARRAY(p, nelem) (p = av_malloc_array(nelem, sizeof(*p))) #define FF_ALLOCZ_TYPED_ARRAY(p, nelem) (p = av_calloc(nelem, sizeof(*p))) -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
