summaryrefslogtreecommitdiffhomepage
path: root/patches/libtheora/fix-mmx.patch
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2018-08-05 11:50:24 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2018-08-05 11:50:24 +0000
commite3166d73c6ae7652efe2c365ae4790f1e43984b4 (patch)
treefb5ee0e57c3e82cc88f3238b5c38dfd847126a6b /patches/libtheora/fix-mmx.patch
parent6bc683c576b8216cf1672f2d884b704737d09af8 (diff)
downloadmidipix_build-e3166d73c6ae7652efe2c365ae4790f1e43984b4.tar.bz2
midipix_build-e3166d73c6ae7652efe2c365ae4790f1e43984b4.tar.xz
vars/build.vars:native_packages_deps: adds lib{xslt,theora} v{1.1.32,1.1.1} (via Redfoxmoon.)
vars/build.vars:native_packages_inet: adds microsocks (HEAD) (via Redfoxmoon.) patches/lib{theora,xslt}*: via Redfoxmoon.
Diffstat (limited to 'patches/libtheora/fix-mmx.patch')
-rw-r--r--patches/libtheora/fix-mmx.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/libtheora/fix-mmx.patch b/patches/libtheora/fix-mmx.patch
new file mode 100644
index 00000000..63fb9f76
--- /dev/null
+++ b/patches/libtheora/fix-mmx.patch
@@ -0,0 +1,31 @@
+http://bugs.alpinelinux.org/issues/6132
+https://trac.xiph.org/ticket/2287
+
+patch rebased for libtheory 1.1.1 stable
+
+diff -ru libtheora-1.1.1.orig/lib/encode.c libtheora-1.1.1/lib/encode.c
+--- libtheora-1.1.1.orig/lib/encode.c 2009-08-22 18:14:04.000000000 +0000
++++ libtheora-1.1.1/lib/encode.c 2016-09-15 05:27:02.065785527 +0000
+@@ -864,6 +864,9 @@
+ }
+
+ static void oc_enc_frame_pack(oc_enc_ctx *_enc){
++ /*musl libc malloc()/realloc() calls might use floating point, so make sure
++ we've cleared the MMX state for them.*/
++ oc_restore_fpu(&_enc->state);
+ oggpackB_reset(&_enc->opb);
+ /*Only proceed if we have some coded blocks.
+ If there are no coded blocks, we can drop this frame simply by emitting a
+diff -ru libtheora-1.1.1.orig/lib/decode.c libtheora-1.1.1/lib/decode.c
+--- libtheora-1.1.1.orig/lib/decode.c 2009-09-26 20:55:21.000000000 +0000
++++ libtheora-1.1.1/lib/decode.c 2016-09-15 05:29:45.912196850 +0000
+@@ -1181,6 +1181,9 @@
+
+
+ static int oc_dec_postprocess_init(oc_dec_ctx *_dec){
++ /*musl libc malloc()/realloc() calls might use floating point, so make sure
++ we've cleared the MMX state for them.*/
++ oc_restore_fpu(&_dec->state);
+ /*pp_level 0: disabled; free any memory used and return*/
+ if(_dec->pp_level<=OC_PP_LEVEL_DISABLED){
+ if(_dec->dc_qis!=NULL){