Skip to content

Commit

Permalink
external libs: rebuilt vorbis, ogg, and flac from newer sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Oct 6, 2019
1 parent 8208327 commit 7bb1042
Show file tree
Hide file tree
Showing 494 changed files with 3,743 additions and 3,762 deletions.
1 change: 0 additions & 1 deletion VisualC/external/include/vorbis/codec.h
Expand Up @@ -11,7 +11,6 @@
********************************************************************
function: libvorbis codec headers
last mod: $Id: codec.h 17021 2010-03-24 09:29:41Z xiphmont $
********************************************************************/

Expand Down
1 change: 0 additions & 1 deletion VisualC/external/include/vorbis/vorbisfile.h
Expand Up @@ -11,7 +11,6 @@
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
last mod: $Id: vorbisfile.h 17182 2010-04-29 03:48:32Z xiphmont $
********************************************************************/

Expand Down
4 changes: 2 additions & 2 deletions VisualC/external/lib/x64/LICENSE.ogg-vorbis.txt
@@ -1,8 +1,8 @@
The source code to this library used with SDL_mixer can be found here:
https://hg.libsdl.org/SDL_image/file/default/external
https://hg.libsdl.org/SDL_mixer/file/default/external
---

Copyright (c) 2002-2008 Xiph.org Foundation
Copyright (c) 2002-2018 Xiph.org Foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
Binary file modified VisualC/external/lib/x64/libFLAC-8.dll
Binary file not shown.
Binary file modified VisualC/external/lib/x64/libogg-0.dll
Binary file not shown.
Binary file modified VisualC/external/lib/x64/libvorbis-0.dll
Binary file not shown.
Binary file modified VisualC/external/lib/x64/libvorbisfile-3.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions VisualC/external/lib/x86/LICENSE.ogg-vorbis.txt
@@ -1,8 +1,8 @@
The source code to this library used with SDL_mixer can be found here:
https://hg.libsdl.org/SDL_image/file/default/external
https://hg.libsdl.org/SDL_mixer/file/default/external
---

Copyright (c) 2002-2008 Xiph.org Foundation
Copyright (c) 2002-2018 Xiph.org Foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
Binary file modified VisualC/external/lib/x86/libFLAC-8.dll
Binary file not shown.
Binary file modified VisualC/external/lib/x86/libogg-0.dll
Binary file not shown.
Binary file modified VisualC/external/lib/x86/libvorbis-0.dll
Binary file not shown.
Binary file modified VisualC/external/lib/x86/libvorbisfile-3.dll
Binary file not shown.
Binary file modified Xcode/Frameworks/FLAC.framework/Versions/A/FLAC
Binary file not shown.
Binary file modified Xcode/Frameworks/Ogg.framework/Versions/A/Ogg
Binary file not shown.
Expand Up @@ -9,23 +9,23 @@
<key>CFBundleExecutable</key>
<string>Ogg</string>
<key>CFBundleGetInfoString</key>
<string>Ogg framework 1.1.4, Copyright © 1994-2009 Xiph.Org Foundation</string>
<string>Ogg framework 1.3.2, Copyright © 1994-2009 Xiph.Org Foundation</string>
<key>CFBundleIdentifier</key>
<string>org.xiph.ogg</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.4</string>
<string>1.3.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.1.4</string>
<string>1.3.2</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>DTCompiler</key>
Expand All @@ -43,6 +43,6 @@
<key>DTXcodeBuild</key>
<string>9A235</string>
<key>NSHumanReadableCopyright</key>
<string>Ogg framework 1.1.4, Copyright © 1994-2009 Xiph.Org Foundation</string>
<string>Ogg framework 1.3.2, Copyright © 1994-2009 Xiph.Org Foundation</string>
</dict>
</plist>
Expand Up @@ -2,7 +2,7 @@ The source code to this library used with SDL_mixer can be found here:
http://www.libsdl.org/projects/SDL_mixer/libs/
---

Copyright (c) 2002-2008 Xiph.org Foundation
Copyright (c) 2002-2018 Xiph.org Foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
Expand Up @@ -11,7 +11,6 @@
********************************************************************
function: libvorbis codec headers
last mod: $Id: codec.h 17021 2010-03-24 09:29:41Z xiphmont $
********************************************************************/

Expand Down
Expand Up @@ -11,7 +11,6 @@
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
last mod: $Id: vorbisfile.h 17182 2010-04-29 03:48:32Z xiphmont $
********************************************************************/

Expand Down
Expand Up @@ -9,23 +9,23 @@
<key>CFBundleExecutable</key>
<string>Vorbis</string>
<key>CFBundleGetInfoString</key>
<string>Vorbis framework 1.2.3, Copyright © 1994-2009 Xiph.Org Foundation</string>
<string>Vorbis framework 1.3.6, Copyright © 1994-2009 Xiph.Org Foundation</string>
<key>CFBundleIdentifier</key>
<string>org.xiph.vorbis</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2.3</string>
<string>1.3.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.2.3</string>
<string>1.3.6</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>DTCompiler</key>
Expand All @@ -43,6 +43,6 @@
<key>DTXcodeBuild</key>
<string>9A235</string>
<key>NSHumanReadableCopyright</key>
<string>Vorbis framework 1.2.3, Copyright © 1994-2009 Xiph.Org Foundation</string>
<string>Vorbis framework 1.3.6, Copyright © 1994-2009 Xiph.Org Foundation</string>
</dict>
</plist>
Expand Up @@ -2,7 +2,7 @@ The source code to this library used with SDL_mixer can be found here:
http://www.libsdl.org/projects/SDL_mixer/libs/
---

Copyright (c) 2002-2008 Xiph.org Foundation
Copyright (c) 2002-2018 Xiph.org Foundation

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
Binary file modified Xcode/Frameworks/Vorbis.framework/Versions/A/Vorbis
Binary file not shown.
22 changes: 22 additions & 0 deletions external/flac-1.3.2/0050-flac.git-4f47b63e.patch
@@ -0,0 +1,22 @@
From 4f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Sat, 8 Apr 2017 18:34:49 +1000
Subject: [PATCH 50/69] stream_decoder.c: Fix a memory leak

Leak reported by Secunia Research.
---
src/libFLAC/stream_decoder.c | 3 +++
1 file changed, 3 insertions(+)

--- a/src/libFLAC/stream_decoder.c
+++ b/src/libFLAC/stream_decoder.c
@@ -1759,6 +1759,9 @@ FLAC__bool read_metadata_vorbiscomment_(
}
memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
+ /* Current i-th entry is bad, so we delete it. */
+ free (obj->comments[i].entry) ;
+ obj->comments[i].entry = NULL ;
obj->num_comments = i;
goto skip;
}
29 changes: 29 additions & 0 deletions external/flac-1.3.2/0051-flac.git-952c93b2.patch
@@ -0,0 +1,29 @@
From 952c93b2d71c2172d7df8e0d6a9321eeb68cb37a Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Sun, 9 Apr 2017 15:17:06 +1000
Subject: [PATCH 51/69] metaflac: Fix a memory leak

---
src/metaflac/operations.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--- a/src/metaflac/operations.c
+++ b/src/metaflac/operations.c
@@ -286,7 +286,8 @@ FLAC__bool do_shorthand_operations_on_fi

if(!FLAC__metadata_chain_read(chain, filename)) {
print_error_with_chain_status(chain, "%s: ERROR: reading metadata", filename);
- return false;
+ ok = false;
+ goto cleanup;
}

for(i = 0; i < options->ops.num_operations && ok; i++) {
@@ -325,6 +326,7 @@ FLAC__bool do_shorthand_operations_on_fi
print_error_with_chain_status(chain, "%s: ERROR: writing FLAC file", filename);
}

+ cleanup :
FLAC__metadata_chain_delete(chain);

return ok;
27 changes: 27 additions & 0 deletions external/flac-1.3.2/0052-flac.git-230cffe0.patch
@@ -0,0 +1,27 @@
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Mon, 2 Jan 2017 17:46:20 +0000 (+1100)
Subject: libFLAC/cpu.c: Fix CPU detecton
X-Git-Tag: 1.3.3~131
X-Git-Url: http://git.xiph.org/?p=flac.git;a=commitdiff_plain;h=230cffe08ff0c965de2ce111afe4513286bfda89

libFLAC/cpu.c: Fix CPU detecton

Patch-from: Janne Hyvärinen <cse@sci.fi>
---

diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c
index b9df19a9..808d55d7 100644
--- a/src/libFLAC/cpu.c
+++ b/src/libFLAC/cpu.c
@@ -269,9 +269,9 @@ void FLAC__cpu_info_x86(FLAC__uint32 level, FLAC__uint32 *eax, FLAC__uint32 *ebx
__cpuid(cpuinfo, ext);
if((unsigned)cpuinfo[0] >= level) {
#if FLAC__AVX_SUPPORTED
- __cpuidex(cpuinfo, ext, 0); /* for AVX2 detection */
+ __cpuidex(cpuinfo, level, 0); /* for AVX2 detection */
#else
- __cpuid(cpuinfo, ext); /* some old compilers don't support __cpuidex */
+ __cpuid(cpuinfo, level); /* some old compilers don't support __cpuidex */
#endif

*eax = cpuinfo[0]; *ebx = cpuinfo[1]; *ecx = cpuinfo[2]; *edx = cpuinfo[3];
25 changes: 25 additions & 0 deletions external/flac-1.3.2/0053-flac.git-4a43f2bd.patch
@@ -0,0 +1,25 @@
From: sezero <sezero@users.sourceforge.net>
Date: Sun, 4 Aug 2019 23:00:40 +0000 (+0300)
Subject: Do not assume that sys/param.h defines MIN and MAX
X-Git-Url: http://git.xiph.org/?p=flac.git;a=commitdiff_plain;h=4a43f2bd4d7e12b5d994f48e18cf014008d204ce

Do not assume that sys/param.h defines MIN and MAX

One such example is sys/param.h from MinGW.
---

diff --git a/src/libFLAC/include/private/macros.h b/src/libFLAC/include/private/macros.h
index 02eada45..3a8072ec 100644
--- a/src/libFLAC/include/private/macros.h
+++ b/src/libFLAC/include/private/macros.h
@@ -51,8 +51,10 @@
/* Whatever other unix that has sys/param.h */
#elif defined(HAVE_SYS_PARAM_H)
#include <sys/param.h>
+#if defined(MIN) && defined(MAX)
#define flac_max(a,b) MAX(a,b)
#define flac_min(a,b) MIN(a,b)
+#endif

/* Windows VS has them in stdlib.h.. XXX:Untested */
#elif defined(_MSC_VER)
24 changes: 24 additions & 0 deletions external/flac-1.3.2/0054-flac.git-6ecd1a26.patch
@@ -0,0 +1,24 @@
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Fri, 13 Jan 2017 10:30:55 +0000 (+1100)
Subject: libFLAC/cpu.c: Fix build issue on OpenBSD/i386
X-Git-Tag: 1.3.3~128
X-Git-Url: http://git.xiph.org/?p=flac.git;a=commitdiff_plain;h=6ecd1a2607a337638adb5caa67a61e7719e0e3a4

libFLAC/cpu.c: Fix build issue on OpenBSD/i386

Patch-from: Christian Weisgerber <naddy@mips.inka.de>
---

diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c
index 808d55d7..12d46191 100644
--- a/src/libFLAC/cpu.c
+++ b/src/libFLAC/cpu.c
@@ -65,7 +65,7 @@ static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE = 0x02000000;
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE2 = 0x04000000;
#endif

-#if FLAC__HAS_X86INTRIN || FLAC__AVX_SUPPORTED
+#if FLAC__HAS_X86INTRIN || FLAC__AVX_SUPPORTED || defined FLAC__HAS_NASM
/* these are flags in ECX of CPUID AX=00000001 */
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE3 = 0x00000001;
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSSE3 = 0x00000200;
26 changes: 26 additions & 0 deletions external/flac-1.3.2/0055-flac.git-d1780580.patch
@@ -0,0 +1,26 @@
From: sezero <sezero@users.sourceforge.net>
Date: Sat, 14 Jan 2017 22:56:56 +0000 (+0300)
Subject: libFLAC/cpu.c: Replace memory.h include with string.h
X-Git-Tag: 1.3.3~117
X-Git-Url: http://git.xiph.org/?p=flac.git;a=commitdiff_plain;h=d178058028050aeec649c85644cc9eed08f0aa37

libFLAC/cpu.c: Replace memory.h include with string.h

cpu.c was the only source to use memory.h instead of string.h.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
---

diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c
index 1c80a728..6629fb95 100644
--- a/src/libFLAC/cpu.c
+++ b/src/libFLAC/cpu.c
@@ -37,7 +37,7 @@
#include "private/cpu.h"
#include "share/compat.h"
#include <stdlib.h>
-#include <memory.h>
+#include <string.h>

#if defined(_MSC_VER)
# include <intrin.h> /* for __cpuid() and _xgetbv() */
8 changes: 4 additions & 4 deletions external/flac-1.3.2/src/libFLAC/cpu.c
Expand Up @@ -37,7 +37,7 @@
#include "private/cpu.h"
#include "share/compat.h"
#include <stdlib.h>
#include <memory.h>
#include <string.h>

#if defined(_MSC_VER)
# include <intrin.h> /* for __cpuid() and _xgetbv() */
Expand Down Expand Up @@ -65,7 +65,7 @@ static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE = 0x02000000;
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE2 = 0x04000000;
#endif

#if FLAC__HAS_X86INTRIN || FLAC__AVX_SUPPORTED
#if FLAC__HAS_X86INTRIN || FLAC__AVX_SUPPORTED || defined FLAC__HAS_NASM
/* these are flags in ECX of CPUID AX=00000001 */
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE3 = 0x00000001;
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSSE3 = 0x00000200;
Expand Down Expand Up @@ -269,9 +269,9 @@ void FLAC__cpu_info_x86(FLAC__uint32 level, FLAC__uint32 *eax, FLAC__uint32 *ebx
__cpuid(cpuinfo, ext);
if((unsigned)cpuinfo[0] >= level) {
#if FLAC__AVX_SUPPORTED
__cpuidex(cpuinfo, ext, 0); /* for AVX2 detection */
__cpuidex(cpuinfo, level, 0); /* for AVX2 detection */
#else
__cpuid(cpuinfo, ext); /* some old compilers don't support __cpuidex */
__cpuid(cpuinfo, level); /* some old compilers don't support __cpuidex */
#endif

*eax = cpuinfo[0]; *ebx = cpuinfo[1]; *ecx = cpuinfo[2]; *edx = cpuinfo[3];
Expand Down
2 changes: 2 additions & 0 deletions external/flac-1.3.2/src/libFLAC/include/private/macros.h
Expand Up @@ -51,8 +51,10 @@
/* Whatever other unix that has sys/param.h */
#elif defined(HAVE_SYS_PARAM_H)
#include <sys/param.h>
#if defined(MIN) && defined(MAX)
#define flac_max(a,b) MAX(a,b)
#define flac_min(a,b) MIN(a,b)
#endif

/* Windows VS has them in stdlib.h.. XXX:Untested */
#elif defined(_MSC_VER)
Expand Down
3 changes: 3 additions & 0 deletions external/flac-1.3.2/src/libFLAC/stream_decoder.c
Expand Up @@ -1759,6 +1759,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
}
memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
/* Current i-th entry is bad, so we delete it. */
free (obj->comments[i].entry) ;
obj->comments[i].entry = NULL ;
obj->num_comments = i;
goto skip;
}
Expand Down
4 changes: 3 additions & 1 deletion external/flac-1.3.2/src/metaflac/operations.c
Expand Up @@ -286,7 +286,8 @@ FLAC__bool do_shorthand_operations_on_file(const char *filename, const CommandLi

if(!FLAC__metadata_chain_read(chain, filename)) {
print_error_with_chain_status(chain, "%s: ERROR: reading metadata", filename);
return false;
ok = false;
goto cleanup;
}

for(i = 0; i < options->ops.num_operations && ok; i++) {
Expand Down Expand Up @@ -325,6 +326,7 @@ FLAC__bool do_shorthand_operations_on_file(const char *filename, const CommandLi
print_error_with_chain_status(chain, "%s: ERROR: writing FLAC file", filename);
}

cleanup :
FLAC__metadata_chain_delete(chain);

return ok;
Expand Down

0 comments on commit 7bb1042

Please sign in to comment.