From a1b1414625ce3214d915372e7dfada5884d3198d Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sun, 24 Jul 2022 02:37:36 +0300
Subject: [PATCH 2/3] ffmpeg 5.1 first patch or termux

---
 .../thirdparty/src/ffmpeg-5.1.patch0          | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patch0

diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patch0 b/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patch0
new file mode 100644
index 00000000..2fe3c680
--- /dev/null
+++ b/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patch0
@@ -0,0 +1,39 @@
+diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
+index f460479498..61a88b8e95 100644
+--- a/libavcodec/aaccoder.c
++++ b/libavcodec/aaccoder.c
+@@ -60,6 +60,8 @@
+  * replace low energy non zero bands */
+ #define NOISE_LAMBDA_REPLACE 1.948f
+ 
++#undef B0
++
+ #include "libavcodec/aaccoder_trellis.h"
+ 
+ /**
+diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
+index 516e4a6b7a..639d19ca62 100644
+--- a/libavcodec/hevc_mvs.c
++++ b/libavcodec/hevc_mvs.c
+@@ -25,6 +25,8 @@
+ #include "hevcdec.h"
+ #include "threadframe.h"
+ 
++#undef B0
++
+ static const uint8_t l0_l1_cand_idx[12][2] = {
+     { 0, 1, },
+     { 1, 0, },
+diff --git a/libavcodec/opus_pvq.c b/libavcodec/opus_pvq.c
+index a4e44b7a14..93ed179347 100644
+--- a/libavcodec/opus_pvq.c
++++ b/libavcodec/opus_pvq.c
+@@ -31,6 +31,8 @@
+ #define CELT_PVQ_U(n, k) (ff_celt_pvq_u_row[FFMIN(n, k)][FFMAX(n, k)])
+ #define CELT_PVQ_V(n, k) (CELT_PVQ_U(n, k) + CELT_PVQ_U(n, (k) + 1))
+ 
++#undef B0
++
+ static inline int16_t celt_cos(int16_t x)
+ {
+     x = (MUL16(x, x) + 4096) >> 13;
-- 
2.37.1

