Fix runtime crash with certain MPEG2 files on pre-10 systems.
PR: 199283 MFH: 2015Q2
This commit is contained in:
parent
7012a8c384
commit
30a5a15085
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=383871
5 changed files with 34 additions and 24 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= mencoder
|
||||
PORTVERSION= ${MPLAYER_PORT_VERSION}
|
||||
PORTREVISION= 1
|
||||
|
||||
COMMENT= Convenient video file and movie encoder
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= mplayer
|
||||
PORTVERSION= ${MPLAYER_PORT_VERSION}
|
||||
PORTREVISION= 1
|
||||
|
||||
COMMENT= High performance media player supporting many formats
|
||||
|
||||
|
|
|
@ -84,6 +84,11 @@ CONFIGURE_ARGS+= --disable-tv-v4l1 \
|
|||
# Build system handling (including OPTIONS)
|
||||
# =========================================
|
||||
|
||||
# Support for aligned_alloc
|
||||
.if ${OSVERSION} >= 1000000
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-aligned_alloc
|
||||
.endif
|
||||
|
||||
# Supported architectures for runtime CPU detection
|
||||
.if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ppc"
|
||||
MPLAYER_RTCPU_SUPPORTED_ARCH= yes
|
||||
|
|
27
multimedia/mplayer/files/extra-patch-aligned_alloc
Normal file
27
multimedia/mplayer/files/extra-patch-aligned_alloc
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- configure.orig 2014-12-17 22:02:44.000000000 +0100
|
||||
+++ configure 2015-03-28 13:56:41.340987552 +0100
|
||||
@@ -3798,17 +3808,17 @@
|
||||
echores "$aligned_malloc"
|
||||
|
||||
|
||||
-echocheck "memalign()"
|
||||
+echocheck "aligned_alloc()"
|
||||
# XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
|
||||
-def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
|
||||
+def_memalign='#define HAVE_MEMALIGN 0'
|
||||
_memalign=no
|
||||
-statement_check malloc.h 'memalign(64, sizeof(char))' && _memalign=yes
|
||||
+statement_check stdlib.h 'aligned_alloc(32, 32*sizeof(char))' && _memalign=yes
|
||||
if test "$_memalign" = yes ; then
|
||||
- def_memalign='#define HAVE_MEMALIGN 1'
|
||||
+ def_map_memalign='#define memalign(a, b) aligned_alloc(a, b)'
|
||||
+ def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
|
||||
else
|
||||
- def_memalign='#define HAVE_MEMALIGN 0'
|
||||
def_map_memalign='#define memalign(a, b) malloc(b)'
|
||||
- darwin || def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
|
||||
+ def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
|
||||
fi
|
||||
echores "$_memalign"
|
||||
|
||||
|
|
@ -62,30 +62,6 @@
|
|||
echocheck "softfloat ABI"
|
||||
softfloat=yes
|
||||
cpp_condition_check '' 'defined(__ARM_PCS_VFP) || (!defined(__ARM_PCS) && !defined(__SOFTFP__))' && softfloat=no
|
||||
@@ -3798,17 +3808,17 @@
|
||||
echores "$aligned_malloc"
|
||||
|
||||
|
||||
-echocheck "memalign()"
|
||||
+echocheck "aligned_alloc()"
|
||||
# XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
|
||||
-def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
|
||||
+def_memalign='#define HAVE_MEMALIGN 0'
|
||||
_memalign=no
|
||||
-statement_check malloc.h 'memalign(64, sizeof(char))' && _memalign=yes
|
||||
+statement_check stdlib.h 'aligned_alloc(32, 32*sizeof(char))' && _memalign=yes
|
||||
if test "$_memalign" = yes ; then
|
||||
- def_memalign='#define HAVE_MEMALIGN 1'
|
||||
+ def_map_memalign='#define memalign(a, b) aligned_alloc(a, b)'
|
||||
+ def_memalign_hack='#define CONFIG_MEMALIGN_HACK 0'
|
||||
else
|
||||
- def_memalign='#define HAVE_MEMALIGN 0'
|
||||
def_map_memalign='#define memalign(a, b) malloc(b)'
|
||||
- darwin || def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
|
||||
+ def_memalign_hack='#define CONFIG_MEMALIGN_HACK 1'
|
||||
fi
|
||||
echores "$_memalign"
|
||||
|
||||
@@ -3914,7 +3924,7 @@
|
||||
if linux ; then
|
||||
THREAD_CFLAGS=-D_REENTRANT
|
||||
|
|
Loading…
Reference in a new issue