Commit b34275c7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Update patches

parent aeb6fb79
From 33122d01cb1b321b7058d1bb5dd3e13fc67671fb Mon Sep 17 00:00:00 2001
From abd4cefb85c74f747b0f6d674d3e39c189bd4b1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Philippe=20Andr=C3=A9?= <jpeg@videolan.org>
Date: Thu, 2 Jun 2011 15:15:57 +0200
Subject: [PATCH 1/4] Android: add compatibility pthread_cancel
Subject: [PATCH 1/3] Android: add compatibility pthread_cancel
Original-code: c1ee19f63a6c6773400e98a9265b0a7e49fd528c
7884ed8d407647a1523afb8be6a2859477d54fd7
......@@ -320,10 +320,10 @@ index 0000000..8a39f5d
+ return ret;
+}
diff --git a/configure.ac b/configure.ac
index 391af84..0b979bc 100644
index c5de680..5e6f9fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -469,6 +469,10 @@ if test "${SYS}" = "mingw32" ; then
@@ -483,6 +483,10 @@ if test "${SYS}" = "mingw32" ; then
CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
fi
......@@ -335,10 +335,10 @@ index 391af84..0b979bc 100644
dnl Buggy glibc prevention. Purposedly not cached.
dnl See sourceware.org bugs 5058 and 5443.
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 15ebb4c..16a460a 100644
index 16172f5..e13b1ab 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -333,4 +333,29 @@ long nrand48 (unsigned short subi[3]);
@@ -330,4 +330,29 @@ long nrand48 (unsigned short subi[3]);
# undef HAVE_FORK /* Implementation of fork() is imperfect on OS/2 */
#endif
......@@ -410,10 +410,10 @@ index ef2ecdc..441953c 100644
vlc_mutex_unlock (&lock);
}
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 122e201..b8211e5 100644
index 1d0d077..6cfe7a0 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -153,7 +153,9 @@ void vlc_trace (const char *fn, const char *file, unsigned line)
@@ -146,7 +146,9 @@ void vlc_trace (const char *fn, const char *file, unsigned line)
static inline unsigned long vlc_threadid (void)
{
......@@ -424,7 +424,7 @@ index 122e201..b8211e5 100644
/* glibc does not provide a call for this */
return syscall (SYS_gettid);
@@ -435,7 +437,11 @@ void vlc_cond_broadcast (vlc_cond_t *p_condvar)
@@ -428,7 +430,11 @@ void vlc_cond_broadcast (vlc_cond_t *p_condvar)
*/
void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
{
......@@ -436,7 +436,7 @@ index 122e201..b8211e5 100644
VLC_THREAD_ASSERT ("waiting on condition");
}
@@ -472,7 +478,12 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
@@ -465,7 +471,12 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
#endif
struct timespec ts = mtime_to_ts (deadline);
......@@ -449,7 +449,7 @@ index 122e201..b8211e5 100644
if (val != ETIMEDOUT)
VLC_THREAD_ASSERT ("timed-waiting on condition");
return val;
@@ -511,6 +522,14 @@ void vlc_sem_destroy (vlc_sem_t *sem)
@@ -504,6 +515,14 @@ void vlc_sem_destroy (vlc_sem_t *sem)
val = errno;
#endif
......@@ -464,7 +464,7 @@ index 122e201..b8211e5 100644
VLC_THREAD_ASSERT ("destroying semaphore");
}
@@ -741,7 +760,11 @@ static int vlc_clone_attr (vlc_thread_t *th, pthread_attr_t *attr,
@@ -734,7 +753,11 @@ static int vlc_clone_attr (vlc_thread_t *th, pthread_attr_t *attr,
assert (ret == 0); /* fails iif VLC_STACKSIZE is invalid */
#endif
......@@ -477,5 +477,5 @@ index 122e201..b8211e5 100644
pthread_attr_destroy (attr);
return ret;
--
1.7.8.3
1.7.9.1
From 1b9b62e8bd39d752d867a2ad273b5e546dd001b8 Mon Sep 17 00:00:00 2001
From 699c382047607310a892e019ecf16dc2f4d55937 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Duraffort?= <ivoire@videolan.org>
Date: Sun, 7 Nov 2010 19:11:51 +0100
Subject: [PATCH 2/4] Implement rw_locks, needed for Android 2.2 and below
Subject: [PATCH 2/3] Implement rw_locks, needed for Android 2.2 and below
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
......@@ -45,10 +45,10 @@ index 7a6c6af..181f273 100644
typedef struct vlc_timer *vlc_timer_t;
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 9d9c771..031dcc2 100644
index 6cfe7a0..5781a94 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -579,6 +579,7 @@ void vlc_sem_wait (vlc_sem_t *sem)
@@ -574,6 +574,7 @@ void vlc_sem_wait (vlc_sem_t *sem)
VLC_THREAD_ASSERT ("locking semaphore");
}
......@@ -56,7 +56,7 @@ index 9d9c771..031dcc2 100644
/**
* Initializes a read/write lock.
*/
@@ -623,6 +624,81 @@ void vlc_rwlock_unlock (vlc_rwlock_t *lock)
@@ -618,6 +619,81 @@ void vlc_rwlock_unlock (vlc_rwlock_t *lock)
int val = pthread_rwlock_unlock (lock);
VLC_THREAD_ASSERT ("releasing R/W lock");
}
......@@ -139,5 +139,5 @@ index 9d9c771..031dcc2 100644
/**
* Allocates a thread-specific variable.
--
1.7.8.4
1.7.9.1
From d74c51c6f7a3fa7a8df5e20bf71aabebd4342f42 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Thu, 9 Feb 2012 00:07:16 +0100
Subject: [PATCH 3/3] Contribs: add an option to optimize a bit for the size
Notably for libavcodec
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
contrib/bootstrap | 5 +++++
contrib/src/ffmpeg/rules.mak | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index a4b5410..32db642 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -28,6 +28,7 @@ usage()
echo " --enable-FOO configure to build package FOO"
echo " --disable-disc configure to not build optical discs packages"
echo " --disable-sout configure to not build stream output packages"
+ echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]"
}
BUILD=
@@ -66,6 +67,9 @@ do
--disable-sout)
BUILD_ENCODERS=
;;
+ --enable-small)
+ ENABLE_SMALL=1
+ ;;
--disable-*)
PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
;;
@@ -161,6 +165,7 @@ check_android_sdk()
test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS"
test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
+test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
#
# Checks
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index e92c191..b57989e 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -32,7 +32,10 @@ FFMPEGCONF += --enable-libmp3lame --enable-libvpx
DEPS_ffmpeg += lame $(DEPS_lame) vpx $(DEPS_vpx)
else
FFMPEGCONF += --disable-encoders --disable-muxers
-# XXX: REVISIT --enable-small ?
+endif
+
+ifdef ENABLE_SMALL
+FFMPEGCONF += --enable-small --optflags=-O2
endif
# XXX: REVISIT
--
1.7.9.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment