diff --git a/contrib/build-pms-binaries.sh b/contrib/build-pms-binaries.sh index 976d04355..70346802e 100755 --- a/contrib/build-pms-binaries.sh +++ b/contrib/build-pms-binaries.sh @@ -2,7 +2,7 @@ # # build-pms-osx.sh # -# Version: 2.0.4 +# Version: 2.0.5 # Last updated: 2012-01-15 # Authors: Patrick Atoon, Happy-Neko # @@ -144,7 +144,7 @@ VERSION_LIBVORBIS=1.3.2 VERSION_LIBTHEORA=1.1.1 VERSION_LIBZEN=0.4.19 VERSION_LZO=2.04 -VERSION_MPLAYER=34393 +VERSION_MPLAYER=34561 VERSION_NCURSES=5.9 VERSION_PS3MEDIASERVER=2011-12-11 VERSION_TSMUXER=1.10.6 @@ -1405,7 +1405,7 @@ build_mplayer() { # See https://svn.macports.org/ticket/30279 # Apply SB patch that was used for the Windows version - patch -p0 < ./../../mplayer-r34393-SB19.patch + patch -p0 < ./../../mplayer-r34561-SB20.patch # Theora and vorbis support seems broken in this revision, disable it for now ./configure --cc=$GCC2 --disable-x11 --disable-gl --disable-qtx \ diff --git a/contrib/mplayer-r34393-SB19.patch b/contrib/mplayer-r34561-SB20.patch similarity index 96% rename from contrib/mplayer-r34393-SB19.patch rename to contrib/mplayer-r34561-SB20.patch index ba3e0c089..918342519 100644 --- a/contrib/mplayer-r34393-SB19.patch +++ b/contrib/mplayer-r34561-SB20.patch @@ -1,8 +1,8 @@ -Index: configure -=================================================================== ---- configure (revision 34354) -+++ configure (working copy) -@@ -563,6 +563,7 @@ +Index: configure +=================================================================== +--- configure (revision 34561) ++++ configure (working copy) +@@ -563,6 +563,7 @@ --with-install=PATH path to a custom install program Advanced options: @@ -10,7 +10,7 @@ Index: configure --enable-mmx enable MMX [autodetect] --enable-mmxext enable MMX2 (Pentium III, Athlon) [autodetect] --enable-3dnow enable 3DNow! [autodetect] -@@ -615,6 +616,7 @@ +@@ -615,6 +616,7 @@ # GOTCHA: the variables below defines the default behavior for autodetection # and have - unless stated otherwise - at least 2 states : yes no # If autodetection is available then the third state is: auto @@ -18,7 +18,7 @@ Index: configure _mmx=auto _3dnow=auto _3dnowext=auto -@@ -1002,6 +1004,9 @@ +@@ -1002,6 +1004,9 @@ --disable-debug) _debug= ;; @@ -28,7 +28,7 @@ Index: configure --enable-runtime-cpudetection) _runtime_cpudetection=yes ;; --disable-runtime-cpudetection) _runtime_cpudetection=no ;; --enable-cross-compile) _cross_compile=yes ;; -@@ -2563,6 +2568,72 @@ +@@ -2563,6 +2568,72 @@ test -n "$cflags_stackrealign" && echores "yes" || echores "no" fi # if darwin && test "$cc_vendor" = "gnu" ; then @@ -101,7 +101,7 @@ Index: configure # Checking for CFLAGS _install_strip="-s" -@@ -3466,10 +3537,17 @@ +@@ -3466,10 +3537,17 @@ if test "$_memalign" = yes ; then def_memalign='#define HAVE_MEMALIGN 1' else @@ -119,7 +119,7 @@ Index: configure echores "$_memalign" -@@ -7673,6 +7751,10 @@ +@@ -7649,6 +7727,10 @@ done libs_mplayer=$ld_tmp @@ -130,11 +130,11 @@ Index: configure ############################################################################# -Index: libao2/ao_sdl.c -=================================================================== ---- libao2/ao_sdl.c (revision 34354) -+++ libao2/ao_sdl.c (working copy) -@@ -142,7 +142,7 @@ +Index: libao2/ao_sdl.c +=================================================================== +--- libao2/ao_sdl.c (revision 34561) ++++ libao2/ao_sdl.c (working copy) +@@ -142,7 +142,7 @@ mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_INFO, rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format)); if(ao_subdevice) { @@ -143,11 +143,11 @@ Index: libao2/ao_sdl.c mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_DriverInfo, ao_subdevice); } -Index: libvo/vo_sdl.c -=================================================================== ---- libvo/vo_sdl.c (revision 34354) -+++ libvo/vo_sdl.c (working copy) -@@ -1427,17 +1427,17 @@ +Index: libvo/vo_sdl.c +=================================================================== +--- libvo/vo_sdl.c (revision 34561) ++++ libvo/vo_sdl.c (working copy) +@@ -1427,17 +1427,17 @@ mp_msg(MSGT_VO,MSGL_DBG3, "SDL: Opening Plugin\n"); if(sdl_driver) { @@ -170,11 +170,11 @@ Index: libvo/vo_sdl.c /* default to no fullscreen mode, we'll set this as soon we have the avail. modes */ priv->fullmode = -2; -Index: mencoder.c -=================================================================== ---- mencoder.c (revision 34354) -+++ mencoder.c (working copy) -@@ -139,6 +139,7 @@ +Index: mencoder.c +=================================================================== +--- mencoder.c (revision 34561) ++++ mencoder.c (working copy) +@@ -139,6 +139,7 @@ int benchmark=0; // A-V sync: @@ -182,7 +182,7 @@ Index: mencoder.c static float default_max_pts_correction=-1;//0.01f; static float max_pts_correction=0;//default_max_pts_correction; static float c_total=0; -@@ -1532,11 +1533,18 @@ +@@ -1532,11 +1533,18 @@ ((ds_tell(d_audio)-sh_audio->a_in_buffer_len)/sh_audio->audio.dwSampleSize) : (d_audio->block_no); // <- used for VBR audio a_pts=samples*(float)sh_audio->audio.dwScale/(float)sh_audio->audio.dwRate; @@ -203,11 +203,11 @@ Index: mencoder.c } v_pts=sh_video ? sh_video->pts : d_video->pts; // av = compensated (with out buffering delay) A-V diff -Index: mp_msg.c -=================================================================== ---- mp_msg.c (revision 34354) -+++ mp_msg.c (working copy) -@@ -34,6 +34,26 @@ +Index: mp_msg.c +=================================================================== +--- mp_msg.c (revision 34561) ++++ mp_msg.c (working copy) +@@ -34,6 +34,26 @@ /* maximum message length of mp_msg */ #define MSGSIZE_MAX 3072 @@ -234,7 +234,7 @@ Index: mp_msg.c int mp_msg_levels[MSGT_MAX]; // verbose level of this module. initialized to -2 int mp_msg_level_all = MSGL_STATUS; int verbose = 0; -@@ -77,6 +97,15 @@ +@@ -77,6 +97,15 @@ } void mp_msg_init(void){ @@ -250,7 +250,7 @@ Index: mp_msg.c int i; char *env = getenv("MPLAYER_VERBOSE"); if (env) -@@ -111,7 +140,11 @@ +@@ -111,7 +140,11 @@ } #endif if (mp_msg_color) @@ -262,7 +262,7 @@ Index: mp_msg.c } static void print_msg_module(FILE* stream, int mod) -@@ -168,11 +201,19 @@ +@@ -168,11 +201,19 @@ if (!mp_msg_module) return; @@ -282,7 +282,7 @@ Index: mp_msg.c fprintf(stream, ": "); } -@@ -240,6 +281,10 @@ +@@ -240,6 +281,10 @@ fprintf(stream, "%s", tmp); if (mp_msg_color) @@ -293,11 +293,11 @@ Index: mp_msg.c +#endif fflush(stream); } -Index: mpcommon.c -=================================================================== ---- mpcommon.c (revision 34354) -+++ mpcommon.c (working copy) -@@ -538,40 +538,46 @@ +Index: mpcommon.c +=================================================================== +--- mpcommon.c (revision 34561) ++++ mpcommon.c (working copy) +@@ -538,40 +538,46 @@ /// Returns a_pts double calc_a_pts(sh_audio_t *sh_audio, demux_stream_t *d_audio) { @@ -378,11 +378,11 @@ Index: mpcommon.c + #endif return a_pts; } -Index: mplayer.c -=================================================================== ---- mplayer.c (revision 34354) -+++ mplayer.c (working copy) -@@ -145,6 +145,12 @@ +Index: mplayer.c +=================================================================== +--- mplayer.c (revision 34561) ++++ mplayer.c (working copy) +@@ -145,6 +145,12 @@ float start_volume = -1; double start_pts = MP_NOPTS_VALUE; char *heartbeat_cmd; @@ -395,7 +395,7 @@ Index: mplayer.c static int max_framesize; int noconsolecontrols; -@@ -525,10 +531,6 @@ +@@ -525,10 +531,6 @@ (mpctx->sh_video && video_start_pts < start_pts)) start_pts = video_start_pts; } @@ -406,7 +406,7 @@ Index: mplayer.c mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_LENGTH=%.2f\n", demuxer_get_time_length(mpctx->demuxer)); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SEEKABLE=%d\n", mpctx->stream->seek && (!mpctx->demuxer || mpctx->demuxer->seekable)); -@@ -3019,7 +3021,15 @@ +@@ -3020,7 +3022,15 @@ gui(GUI_SET_CONTEXT, mpctx); gui(GUI_SET_STATE, (void *)(filename ? GUI_PLAY : GUI_STOP)); } @@ -422,210 +422,210 @@ Index: mplayer.c // ******************* Now, let's see the per-file stuff ******************** -Index: osdep/alloc-win.c -=================================================================== ---- osdep/alloc-win.c (revision 0) -+++ osdep/alloc-win.c (working copy) -@@ -0,0 +1,185 @@ -+#define DEFAULT_ALIGNMENT 16 -+//#define DEBUG_ALLOC -+ -+/* -+ __mingw_aligned_malloc and friends, implemented using Microsoft's public -+ interfaces and with the help of the algorithm description provided -+ by Wu Yongwei: http://sourceforge.net/mailarchive/message.php?msg_id=3847075 -+ -+ I hereby place this implementation in the public domain. -+ -- Steven G. Johnson (stevenj@alum.mit.edu) -+*/ -+ -+#include -+#include -+#include -+#include /* ptrdiff_t */ -+#include /* memmove */ -+ -+#include -+ -+#ifdef DEBUG_ALLOC -+#undef fprintf -+extern int fprintf (FILE *__stream, const char *__format, ...); -+#define TRACE(...) fprintf(stderr, __VA_ARGS__) -+#else -+#define TRACE(...) -+#endif -+ -+#define WILL_WRAP(size, alignment) (size > (0xffffffff - (alignment + sizeof (void *)))) -+ -+#ifdef HAVE_STDINT_H -+# include /* uintptr_t */ -+#else -+# define uintptr_t size_t -+#endif -+ -+#define NOT_POWER_OF_TWO(n) (((n) & ((n) - 1))) -+#define UI(p) ((uintptr_t) (p)) -+#define CP(p) ((char *) p) -+ -+#define PTR_ALIGN(p0, alignment, offset) \ -+ ((void *) (((UI(p0) + (alignment + sizeof(void*)) + offset) \ -+ & (~UI(alignment - 1))) \ -+ - offset)) -+ -+/* Pointer must sometimes be aligned; assume sizeof(void*) is a power of two. */ -+#define ORIG_PTR(p) (*(((void **) (UI(p) & (~UI(sizeof(void*) - 1)))) - 1)) -+ -+static void * -+__mingw_aligned_offset_malloc (size_t size, size_t alignment, size_t offset) -+{ -+ void *p0, *p; -+ -+ if (NOT_POWER_OF_TWO (alignment)) -+ { -+ errno = EINVAL; -+ return ((void *) 0); -+ } -+ if ((size == 0) || WILL_WRAP(size, alignment)) -+ return ((void *) 0); -+ if (alignment < sizeof (void *)) -+ alignment = sizeof (void *); -+ -+ /* Including the extra sizeof(void*) is overkill on a 32-bit -+ machine, since malloc is already 8-byte aligned, as long -+ as we enforce alignment >= 8 ...but oh well. */ -+ -+ p0 = HeapAlloc (GetProcessHeap(), 0, size + (alignment + sizeof (void *))); -+ if (!p0) -+ return ((void *) 0); -+ p = PTR_ALIGN (p0, alignment, offset); -+ ORIG_PTR (p) = p0; -+ return p; -+} -+ -+static void * -+__mingw_aligned_malloc (size_t size, size_t alignment) -+{ -+ return __mingw_aligned_offset_malloc (size, alignment, 0); -+} -+ -+static void -+__mingw_aligned_free (void *memblock) -+{ -+ if (memblock) -+ HeapFree(GetProcessHeap(), 0, ORIG_PTR (memblock)); -+} -+ -+static void * -+__mingw_aligned_offset_realloc (void *memblock, size_t size, -+ size_t alignment, size_t offset) -+{ -+ void *p0, *p; -+ ptrdiff_t shift; -+ -+ if (!memblock) -+ return __mingw_aligned_offset_malloc (size, alignment, offset); -+ if (NOT_POWER_OF_TWO (alignment)) -+ goto bad; -+ if ((size == 0) || WILL_WRAP(size, alignment)) -+ { -+ __mingw_aligned_free (memblock); -+ return ((void *) 0); -+ } -+ if (alignment < sizeof (void *)) -+ alignment = sizeof (void *); -+ -+ p0 = ORIG_PTR (memblock); -+ /* It is an error for the alignment to change. */ -+ if (memblock != PTR_ALIGN (p0, alignment, offset)) -+ goto bad; -+ shift = CP (memblock) - CP (p0); -+ -+ p0 = HeapReAlloc(GetProcessHeap(), 0, p0, size + (alignment + sizeof (void *))); -+ if (!p0) -+ return ((void *) 0); -+ p = PTR_ALIGN (p0, alignment, offset); -+ -+ /* Relative shift of actual data may be different from before, ugh. */ -+ if (shift != CP (p) - CP (p0)) -+ /* ugh, moves more than necessary if size is increased. */ -+ memmove (CP (p), CP (p0) + shift, size); -+ -+ ORIG_PTR (p) = p0; -+ return p; -+ -+bad: -+ errno = EINVAL; -+ return ((void *) 0); -+} -+ -+static void * -+__mingw_aligned_realloc (void *memblock, size_t size, size_t alignment) -+{ -+ return __mingw_aligned_offset_realloc (memblock, size, alignment, 0); -+} -+ -+/* WRAPPERS */ -+ -+void *malloc(size_t size) -+{ -+ void *p = __mingw_aligned_malloc(size, DEFAULT_ALIGNMENT); -+ TRACE("MALLOC(%d) = %p\n", size, p); -+ return p; -+} -+ -+void *memalign(size_t boundary, size_t size) -+{ -+ void *p = __mingw_aligned_malloc(size, boundary); -+ TRACE("MEMALIGN(%d, %d) = %p\n", boundary, size, p); -+ return p; -+} -+ -+void *calloc(size_t nmemb, size_t size) -+{ -+ size_t sz = nmemb * size; -+ char *d = __mingw_aligned_malloc(sz, DEFAULT_ALIGNMENT); -+ memset(d, 0, sz); -+ TRACE("CALLOC(%d, %d) = %p\n", nmemb, size, d); -+ return d; -+} -+ -+void *realloc(void *ptr, size_t size) -+{ -+ void *p = __mingw_aligned_realloc(ptr, size, DEFAULT_ALIGNMENT); -+ TRACE("REALLOC(%p, %d) = %p\n", ptr, size, p); -+ return p; -+} -+ -+void free(void *ptr) -+{ -+ TRACE("FREE(%p)\n", ptr); -+ __mingw_aligned_free(ptr); -+} -+ -+char *strdup(const char *s) -+{ -+ char *d; -+ size_t size = strlen(s) + 1; -+ d = __mingw_aligned_malloc(size, DEFAULT_ALIGNMENT); -+ memcpy(d, s, size - 1); -+ d[size - 1] = 0; -+ TRACE("STRDUP(%p) = %p\n", s, d); -+ return d; -+} -\ No newline at end of file -Index: version.sh -=================================================================== ---- version.sh (revision 34354) -+++ version.sh (working copy) -@@ -17,9 +17,9 @@ +Index: osdep/alloc-win.c +=================================================================== +--- osdep/alloc-win.c (revision 0) ++++ osdep/alloc-win.c (working copy) +@@ -0,0 +1,185 @@ ++#define DEFAULT_ALIGNMENT 16 ++//#define DEBUG_ALLOC ++ ++/* ++ __mingw_aligned_malloc and friends, implemented using Microsoft's public ++ interfaces and with the help of the algorithm description provided ++ by Wu Yongwei: http://sourceforge.net/mailarchive/message.php?msg_id=3847075 ++ ++ I hereby place this implementation in the public domain. ++ -- Steven G. Johnson (stevenj@alum.mit.edu) ++*/ ++ ++#include ++#include ++#include ++#include /* ptrdiff_t */ ++#include /* memmove */ ++ ++#include ++ ++#ifdef DEBUG_ALLOC ++#undef fprintf ++extern int fprintf (FILE *__stream, const char *__format, ...); ++#define TRACE(...) fprintf(stderr, __VA_ARGS__) ++#else ++#define TRACE(...) ++#endif ++ ++#define WILL_WRAP(size, alignment) (size > (0xffffffff - (alignment + sizeof (void *)))) ++ ++#ifdef HAVE_STDINT_H ++# include /* uintptr_t */ ++#else ++# define uintptr_t size_t ++#endif ++ ++#define NOT_POWER_OF_TWO(n) (((n) & ((n) - 1))) ++#define UI(p) ((uintptr_t) (p)) ++#define CP(p) ((char *) p) ++ ++#define PTR_ALIGN(p0, alignment, offset) \ ++ ((void *) (((UI(p0) + (alignment + sizeof(void*)) + offset) \ ++ & (~UI(alignment - 1))) \ ++ - offset)) ++ ++/* Pointer must sometimes be aligned; assume sizeof(void*) is a power of two. */ ++#define ORIG_PTR(p) (*(((void **) (UI(p) & (~UI(sizeof(void*) - 1)))) - 1)) ++ ++static void * ++__mingw_aligned_offset_malloc (size_t size, size_t alignment, size_t offset) ++{ ++ void *p0, *p; ++ ++ if (NOT_POWER_OF_TWO (alignment)) ++ { ++ errno = EINVAL; ++ return ((void *) 0); ++ } ++ if ((size == 0) || WILL_WRAP(size, alignment)) ++ return ((void *) 0); ++ if (alignment < sizeof (void *)) ++ alignment = sizeof (void *); ++ ++ /* Including the extra sizeof(void*) is overkill on a 32-bit ++ machine, since malloc is already 8-byte aligned, as long ++ as we enforce alignment >= 8 ...but oh well. */ ++ ++ p0 = HeapAlloc (GetProcessHeap(), 0, size + (alignment + sizeof (void *))); ++ if (!p0) ++ return ((void *) 0); ++ p = PTR_ALIGN (p0, alignment, offset); ++ ORIG_PTR (p) = p0; ++ return p; ++} ++ ++static void * ++__mingw_aligned_malloc (size_t size, size_t alignment) ++{ ++ return __mingw_aligned_offset_malloc (size, alignment, 0); ++} ++ ++static void ++__mingw_aligned_free (void *memblock) ++{ ++ if (memblock) ++ HeapFree(GetProcessHeap(), 0, ORIG_PTR (memblock)); ++} ++ ++static void * ++__mingw_aligned_offset_realloc (void *memblock, size_t size, ++ size_t alignment, size_t offset) ++{ ++ void *p0, *p; ++ ptrdiff_t shift; ++ ++ if (!memblock) ++ return __mingw_aligned_offset_malloc (size, alignment, offset); ++ if (NOT_POWER_OF_TWO (alignment)) ++ goto bad; ++ if ((size == 0) || WILL_WRAP(size, alignment)) ++ { ++ __mingw_aligned_free (memblock); ++ return ((void *) 0); ++ } ++ if (alignment < sizeof (void *)) ++ alignment = sizeof (void *); ++ ++ p0 = ORIG_PTR (memblock); ++ /* It is an error for the alignment to change. */ ++ if (memblock != PTR_ALIGN (p0, alignment, offset)) ++ goto bad; ++ shift = CP (memblock) - CP (p0); ++ ++ p0 = HeapReAlloc(GetProcessHeap(), 0, p0, size + (alignment + sizeof (void *))); ++ if (!p0) ++ return ((void *) 0); ++ p = PTR_ALIGN (p0, alignment, offset); ++ ++ /* Relative shift of actual data may be different from before, ugh. */ ++ if (shift != CP (p) - CP (p0)) ++ /* ugh, moves more than necessary if size is increased. */ ++ memmove (CP (p), CP (p0) + shift, size); ++ ++ ORIG_PTR (p) = p0; ++ return p; ++ ++bad: ++ errno = EINVAL; ++ return ((void *) 0); ++} ++ ++static void * ++__mingw_aligned_realloc (void *memblock, size_t size, size_t alignment) ++{ ++ return __mingw_aligned_offset_realloc (memblock, size, alignment, 0); ++} ++ ++/* WRAPPERS */ ++ ++void *malloc(size_t size) ++{ ++ void *p = __mingw_aligned_malloc(size, DEFAULT_ALIGNMENT); ++ TRACE("MALLOC(%d) = %p\n", size, p); ++ return p; ++} ++ ++void *memalign(size_t boundary, size_t size) ++{ ++ void *p = __mingw_aligned_malloc(size, boundary); ++ TRACE("MEMALIGN(%d, %d) = %p\n", boundary, size, p); ++ return p; ++} ++ ++void *calloc(size_t nmemb, size_t size) ++{ ++ size_t sz = nmemb * size; ++ char *d = __mingw_aligned_malloc(sz, DEFAULT_ALIGNMENT); ++ memset(d, 0, sz); ++ TRACE("CALLOC(%d, %d) = %p\n", nmemb, size, d); ++ return d; ++} ++ ++void *realloc(void *ptr, size_t size) ++{ ++ void *p = __mingw_aligned_realloc(ptr, size, DEFAULT_ALIGNMENT); ++ TRACE("REALLOC(%p, %d) = %p\n", ptr, size, p); ++ return p; ++} ++ ++void free(void *ptr) ++{ ++ TRACE("FREE(%p)\n", ptr); ++ __mingw_aligned_free(ptr); ++} ++ ++char *strdup(const char *s) ++{ ++ char *d; ++ size_t size = strlen(s) + 1; ++ d = __mingw_aligned_malloc(size, DEFAULT_ALIGNMENT); ++ memcpy(d, s, size - 1); ++ d[size - 1] = 0; ++ TRACE("STRDUP(%p) = %p\n", s, d); ++ return d; ++} +\ No newline at end of file +Index: version.sh +=================================================================== +--- version.sh (revision 34561) ++++ version.sh (working copy) +@@ -17,9 +17,9 @@ version=$svn_revision fi -NEW_REVISION="#define VERSION \"${version}${extra}\"" -+NEW_REVISION="#define VERSION \"SB19\"" ++NEW_REVISION="#define VERSION \"SB20\"" OLD_REVISION=$(head -n 1 version.h 2> /dev/null) --TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2011 MPlayer Team\n"' -+TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2011 MPlayer Team\nCustom build by SubJunk, http://www.spirton.com\n\n"' +-TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2012 MPlayer Team\n"' ++TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2012 MPlayer Team\nCustom build by SubJunk, http://www.spirton.com\n\n"' # Update version.h only on revision changes to avoid spurious rebuilds if test "$NEW_REVISION" != "$OLD_REVISION"; then