[vlc-commits] contrib: faad: Bump version to 2.9.1

Hugo Beauzée-Luyssen git at videolan.org
Tue Apr 7 11:13:12 CEST 2020


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Nov 22 11:05:49 2019 +0100| [3efeca40af2fd37988100334f525d5935c17eb3a] | committer: Hugo Beauzée-Luyssen

contrib: faad: Bump version to 2.9.1

And use a maintained upstream

(cherry picked from commit 73f59cab9a279c17412bcd7f78ca8eea2e679bbd)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=3efeca40af2fd37988100334f525d5935c17eb3a
---

 contrib/src/faad2/SHA512SUMS                       |  2 +-
 contrib/src/faad2/faad2-add-define.patch           |  2 +-
 .../src/faad2/faad2-fix-cpe-reconstruction.patch   | 37 ----------------------
 contrib/src/faad2/faad2-fix-overflows.patch        | 25 ---------------
 contrib/src/faad2/rules.mak                        | 13 ++++----
 5 files changed, 8 insertions(+), 71 deletions(-)

diff --git a/contrib/src/faad2/SHA512SUMS b/contrib/src/faad2/SHA512SUMS
index eb5d93a2fc..6573084ec9 100644
--- a/contrib/src/faad2/SHA512SUMS
+++ b/contrib/src/faad2/SHA512SUMS
@@ -1 +1 @@
-8135370497dfcfee09094a03a4a9545ebc58b9e532b89c5d6e5037042549e12ddb75f8903aa05866afac9fa28df96320f1ed2eebffc0660578e54392a51c1161  faad2-2.7.tar.gz
+1015f5b49baebf6c9404cfcd7b9d524cc76a57abcd1a46bb851463ae5226bfd8b80155b661708f66548466422855cd7aeec5676463cd1346c5fb1dc0821621ce  faad2-2_9_1.tar.gz
diff --git a/contrib/src/faad2/faad2-add-define.patch b/contrib/src/faad2/faad2-add-define.patch
index 4f95182f3e..50cf8884c7 100644
--- a/contrib/src/faad2/faad2-add-define.patch
+++ b/contrib/src/faad2/faad2-add-define.patch
@@ -3,7 +3,7 @@
 @@ -70,6 +70,7 @@
  #endif
  
- #define FAAD2_VERSION "2.7"
+ #define FAAD2_VERSION "unknown"
 +#define FAAD2_VIDEOLAN_PATCHED
  
  /* object types for AAC */
diff --git a/contrib/src/faad2/faad2-fix-cpe-reconstruction.patch b/contrib/src/faad2/faad2-fix-cpe-reconstruction.patch
deleted file mode 100644
index 9a345863d3..0000000000
--- a/contrib/src/faad2/faad2-fix-cpe-reconstruction.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-hDecoder->element_alloced denotes whether or not we have allocated memory for
-usage in terms of the specified channel element. Given that it previously only
-had two states (1 meaning allocated, and 0 meaning not allocated), it would not
-allocate enough memory for parsing a CPE it if is preceeded by a SCE (and
-therefor crash).
-
-These changes fixes the issue by making sure that we allocate additional memory
-if so is necessary, and the set of values for hDecoder->element_alloced[n] is
-now:
-
- 0 = nothing allocated
- 1 = allocated enough for SCE
- 2 = allocated enough for CPE
-
-All branches that depend on hDecoder->element_alloced[n] prior to this patch
-only checks if the value is, or is not, zero. The added state, 2, is therefor
-correctly handled automatically.
-
---- faad2/libfaad/specrec.c	2017-03-12 20:16:58.305887783 +0100
-+++ faad2/libfaad/specrec.c	2017-03-25 03:48:19.875321643 +0100
-@@ -1110,13 +1110,13 @@
- #ifdef PROFILE
-     int64_t count = faad_get_ts();
- #endif
--    if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0)
-+    if (hDecoder->element_alloced[hDecoder->fr_ch_ele] != 2)
-     {
-         retval = allocate_channel_pair(hDecoder, cpe->channel, (uint8_t)cpe->paired_channel);
-         if (retval > 0)
-             return retval;
- 
--        hDecoder->element_alloced[hDecoder->fr_ch_ele] = 1;
-+        hDecoder->element_alloced[hDecoder->fr_ch_ele] = 2;
-     }
- 
-     /* dequantisation and scaling */
-
diff --git a/contrib/src/faad2/faad2-fix-overflows.patch b/contrib/src/faad2/faad2-fix-overflows.patch
deleted file mode 100644
index 5a198f8d8f..0000000000
--- a/contrib/src/faad2/faad2-fix-overflows.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- faad2/libfaad/bits.c	2007-11-01 13:33:29.000000000 +0100
-+++ faad2.new/libfaad/bits.c	2019-03-25 17:29:26.134199188 +0100
-@@ -167,7 +167,10 @@
-     int words = bits >> 5;
-     int remainder = bits & 0x1F;
- 
--    ld->bytes_left = ld->buffer_size - words*4;
-+    if (ld->buffer_size < words * 4)
-+        ld->bytes_left = 0;
-+    else
-+        ld->bytes_left = ld->buffer_size - words*4;
- 
-     if (ld->bytes_left >= 4)
-     {
---- faad2/libfaad/syntax.c	2019-03-25 17:57:36.930937066 +0100
-+++ faad2.new/libfaad/syntax.c	2019-03-25 17:49:26.135368525 +0100
-@@ -2292,6 +2292,8 @@
-     while ((drc->additional_excluded_chns[n-1] = faad_get1bit(ld
-         DEBUGVAR(1,104,"excluded_channels(): additional_excluded_chns"))) == 1)
-     {
-+        if (i >= MAX_CHANNELS - num_excl_chan - 7)
-+            return n;
-         for (i = num_excl_chan; i < num_excl_chan+7; i++)
-         {
-             drc->exclude_mask[i] = faad_get1bit(ld
diff --git a/contrib/src/faad2/rules.mak b/contrib/src/faad2/rules.mak
index 301ebd5d8e..cffd00ba8a 100644
--- a/contrib/src/faad2/rules.mak
+++ b/contrib/src/faad2/rules.mak
@@ -1,7 +1,8 @@
 # faad2
 
-FAAD2_VERSION := 2.7
-FAAD2_URL := $(SF)/faac/faad2-$(FAAD2_VERSION).tar.gz
+FAAD2_VERSION := 2.9.1
+FAAD2_VERSION_FIXED := $(subst .,_,$(FAAD2_VERSION))
+FAAD2_URL := $(GITHUB)/knik0/faad2/archive/$(FAAD2_VERSION_FIXED).tar.gz
 
 ifeq ($(findstring $(ARCH),arm),)
 # FAAD is a lot slower than lavc on ARM. Skip it.
@@ -10,21 +11,19 @@ PKGS += faad2
 endif
 endif
 
-$(TARBALLS)/faad2-$(FAAD2_VERSION).tar.gz:
+$(TARBALLS)/faad2-$(FAAD2_VERSION_FIXED).tar.gz:
 	$(call download_pkg,$(FAAD2_URL),faad2)
 
-.sum-faad2: faad2-$(FAAD2_VERSION).tar.gz
+.sum-faad2: faad2-$(FAAD2_VERSION_FIXED).tar.gz
 
-faad2: faad2-$(FAAD2_VERSION).tar.gz .sum-faad2
+faad2: faad2-$(FAAD2_VERSION_FIXED).tar.gz .sum-faad2
 	$(UNPACK)
 ifndef HAVE_FPU
 	$(APPLY) $(SRC)/faad2/faad2-fixed.patch
 endif
 	$(APPLY) $(SRC)/faad2/faad2-disable-drc.patch
 	$(APPLY) $(SRC)/faad2/faad2-fix-71wPCEmapping.patch
-	$(APPLY) $(SRC)/faad2/faad2-fix-cpe-reconstruction.patch
 	$(APPLY) $(SRC)/faad2/faad2-add-define.patch
-	$(APPLY) $(SRC)/faad2/faad2-fix-overflows.patch
 	cd $(UNPACK_DIR) && $(CC) -iquote . -E - </dev/null || sed -i 's/-iquote /-I/' libfaad/Makefile.am
 	$(MOVE)
 



More information about the vlc-commits mailing list