[vlc-commits] contrib: lame: fix a crash when compiled for ARM with MSVC
Steve Lhomme
git at videolan.org
Wed May 29 08:00:27 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue May 28 09:10:23 2019 +0200| [ecbd1205a00dedd707fee4e9be91de75d366e0bc] | committer: Steve Lhomme
contrib: lame: fix a crash when compiled for ARM with MSVC
Probably some issues with the FLOAT in the structure.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecbd1205a00dedd707fee4e9be91de75d366e0bc
---
contrib/src/lame/rules.mak | 3 +++
contrib/src/lame/struct-float-copy.patch | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/contrib/src/lame/rules.mak b/contrib/src/lame/rules.mak
index c0f2df4fce..32827a8e69 100644
--- a/contrib/src/lame/rules.mak
+++ b/contrib/src/lame/rules.mak
@@ -12,6 +12,9 @@ lame: lame-$(LAME_VERSION).tar.gz .sum-lame
$(UNPACK)
$(APPLY) $(SRC)/lame/lame-forceinline.patch
$(APPLY) $(SRC)/lame/sse.patch
+ifdef HAVE_VISUALSTUDIO
+ $(APPLY) $(SRC)/lame/struct-float-copy.patch
+endif
# Avoid relying on iconv.m4 from gettext, when reconfiguring.
# This is only used by the frontend which we disable.
cd $(UNPACK_DIR) && sed -i.orig 's/^AM_ICONV/#&/' configure.in
diff --git a/contrib/src/lame/struct-float-copy.patch b/contrib/src/lame/struct-float-copy.patch
new file mode 100644
index 0000000000..181a0886d1
--- /dev/null
+++ b/contrib/src/lame/struct-float-copy.patch
@@ -0,0 +1,11 @@
+--- lame/libmp3lame/quantize.c.msvc 2017-08-15 15:40:45.000000000 +0200
++++ lame/libmp3lame/quantize.c 2019-05-29 07:55:46.658315100 +0200
+@@ -1137,7 +1137,7 @@ outer_loop(lame_internal_flags * gfc, gr
+ /* save data so we can restore this quantization later */
+ if (better) {
+ best_part2_3_length = cod_info->part2_3_length;
+- best_noise_info = noise_info;
++ memcpy(&best_noise_info, &noise_info, sizeof(best_noise_info));
+ *cod_info = cod_info_w;
+ age = 0;
+ /* save data so we can restore this quantization later */
More information about the vlc-commits
mailing list