aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2020-06-17 12:14:12 -0700
committerLukas Rusak <lorusak@gmail.com>2020-06-19 10:21:02 -0700
commit84bb46f393dde388031daef78724a0ed2d6f8c4e (patch)
tree3589bac89f5a01e13483bf99c898f7cffbe8812e /tools
parent513dae9721222acd760fed9174d7f5b36e25516c (diff)
FFmpeg: Bump to 4.3-Matrix-Alpha1
Diffstat (limited to 'tools')
-rw-r--r--tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch4
-rw-r--r--tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch9
-rw-r--r--tools/buildsteps/windows/patches/0003-ffmpeg-static.patch11
-rw-r--r--tools/buildsteps/windows/patches/0004-ffmpeg-w32pthreads.patch93
-rw-r--r--tools/buildsteps/windows/patches/0005-ffmpeg-detect-dav1d.patch6
-rw-r--r--tools/depends/target/ffmpeg/FFMPEG-VERSION2
6 files changed, 17 insertions, 108 deletions
diff --git a/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch b/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch
index aec54109d7..7e48887a6b 100644
--- a/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch
+++ b/tools/buildsteps/windows/patches/0001-ffmpeg-detect-openssl.patch
@@ -1,8 +1,8 @@
diff --git a/configure b/configure
-index 34c2adb4a4..160884d8f9 100755
+index 8569a60bf8..42f5a3ada4 100755
--- a/configure
+++ b/configure
-@@ -6358,6 +6358,8 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP
+@@ -6468,6 +6468,8 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
diff --git a/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch b/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch
index ccca50f6f9..55b0b8ba43 100644
--- a/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch
+++ b/tools/buildsteps/windows/patches/0002-ffmpeg-zlib-config-conflict.patch
@@ -1,7 +1,8 @@
-diff -ur ffmpeg/configure ffmpeg-patch/configure
---- ffmpeg/configure 2020-01-31 13:06:00.000000000 +0000
-+++ ffmpeg-patch/configure 2020-01-31 13:06:40.000000000 +0000
-@@ -7439,6 +7439,9 @@
+diff --git a/configure b/configure
+index 8569a60bf8..2091cea243 100755
+--- a/configure
++++ b/configure
+@@ -7553,6 +7553,9 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \
$CONFIG_EXTRA \
$ALL_COMPONENTS \
diff --git a/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch b/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch
index b502afc287..ae6e8a9f48 100644
--- a/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch
+++ b/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch
@@ -1,7 +1,8 @@
-diff -ur ffmpeg/configure ffmpeg-patch/configure
---- ffmpeg/configure 2020-01-31 13:07:30.000000000 +0000
-+++ ffmpeg-patch/configure 2020-01-31 13:08:30.000000000 +0000
-@@ -5312,6 +5312,8 @@
+diff --git a/configure b/configure
+index 8569a60bf8..afca15141e 100755
+--- a/configure
++++ b/configure
+@@ -5401,6 +5401,8 @@ case $target_os in
enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres
enabled x86_32 && check_ldflags -Wl,--large-address-aware
shlibdir_default="$bindir_default"
@@ -10,7 +11,7 @@ diff -ur ffmpeg/configure ffmpeg-patch/configure
SLIBPREF=""
SLIBSUF=".dll"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
-@@ -5361,6 +5363,8 @@
+@@ -5450,6 +5452,8 @@ case $target_os in
fi
enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
shlibdir_default="$bindir_default"
diff --git a/tools/buildsteps/windows/patches/0004-ffmpeg-w32pthreads.patch b/tools/buildsteps/windows/patches/0004-ffmpeg-w32pthreads.patch
deleted file mode 100644
index da0e6a4157..0000000000
--- a/tools/buildsteps/windows/patches/0004-ffmpeg-w32pthreads.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
-index 21acfd2ba1..62e22bd7c6 100644
---- a/compat/w32pthreads.h
-+++ b/compat/w32pthreads.h
-@@ -38,6 +38,7 @@
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #include <process.h>
-+#include <time.h>
-
- #include "libavutil/attributes.h"
- #include "libavutil/common.h"
-@@ -61,6 +62,9 @@ typedef CONDITION_VARIABLE pthread_cond_t;
- #define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0)
- #define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE)
-
-+#define PTHREAD_CANCEL_ENABLE 1
-+#define PTHREAD_CANCEL_DISABLE 0
-+
- static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg)
- {
- pthread_t *h = (pthread_t*)arg;
-@@ -156,10 +160,22 @@ static inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex
- return 0;
- }
-
-+static inline int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
-+const struct timespec *abstime)
-+{
-+ const int milliseconds = abstime->tv_sec * 1000 + abstime->tv_nsec / 1000 / 1000;
-+ SleepConditionVariableSRW(cond, mutex, milliseconds, 0);
-+}
-+
- static inline int pthread_cond_signal(pthread_cond_t *cond)
- {
- WakeConditionVariable(cond);
- return 0;
- }
-
-+static inline int pthread_setcancelstate (int state, int *oldstate)
-+{
-+ return 0;
-+}
-+
- #endif /* COMPAT_W32PTHREADS_H */
-diff --git a/libavformat/udp.c b/libavformat/udp.c
-index cf73d331e0..479b8d630f 100644
---- a/libavformat/udp.c
-+++ b/libavformat/udp.c
-@@ -61,10 +61,16 @@
- #define IPPROTO_UDPLITE 136
- #endif
-
--#if HAVE_PTHREAD_CANCEL
-+#if HAVE_PTHREAD_CANCEL && !defined(HAVE_W32THREADS)
- #include <pthread.h>
- #endif
-
-+#if HAVE_W32THREADS
-+#include "compat/w32pthreads.h"
-+#undef HAVE_PTHREAD_CANCEL
-+#define HAVE_PTHREAD_CANCEL 1
-+#endif
-+
- #ifndef IPV6_ADD_MEMBERSHIP
- #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
- #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
-@@ -473,6 +479,10 @@ static void *circular_buffer_task_rx( void *_URLContext)
- socklen_t addr_len = sizeof(addr);
-
- pthread_mutex_unlock(&s->mutex);
-+
-+ if (s->close_req)
-+ goto end;
-+
- /* Blocking operations are always cancellation points;
- see "General Information" / "Thread Cancelation Overview"
- in Single Unix. */
-@@ -1071,8 +1081,12 @@ static int udp_close(URLContext *h)
- if (s->thread_started) {
- int ret;
- // Cancel only read, as write has been signaled as success to the user
-- if (h->flags & AVIO_FLAG_READ)
-- pthread_cancel(s->circular_buffer_thread);
-+ if (h->flags & AVIO_FLAG_READ) {
-+ pthread_mutex_lock(&s->mutex);
-+ s->close_req = 1;
-+ pthread_cond_signal(&s->cond);
-+ pthread_mutex_unlock(&s->mutex);
-+ }
- ret = pthread_join(s->circular_buffer_thread, NULL);
- if (ret != 0)
- av_log(h, AV_LOG_ERROR, "pthread_join(): %s\n", strerror(ret));
diff --git a/tools/buildsteps/windows/patches/0005-ffmpeg-detect-dav1d.patch b/tools/buildsteps/windows/patches/0005-ffmpeg-detect-dav1d.patch
index 716465ff0f..883ec7e0d6 100644
--- a/tools/buildsteps/windows/patches/0005-ffmpeg-detect-dav1d.patch
+++ b/tools/buildsteps/windows/patches/0005-ffmpeg-detect-dav1d.patch
@@ -1,12 +1,12 @@
diff --git a/configure b/configure
-index 34c2adb4a4..d66d4e8483 100755
+index 8569a60bf8..a368cc65b6 100755
--- a/configure
+++ b/configure
-@@ -6196,7 +6196,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
+@@ -6295,7 +6295,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
--enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.2.1" "dav1d/dav1d.h" dav1d_version
+-enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.4.0" "dav1d/dav1d.h" dav1d_version
+enabled libdav1d && require libdav1d dav1d/dav1d.h dav1d_version -llibdav1d
enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION
index d105be356e..95c44362ea 100644
--- a/tools/depends/target/ffmpeg/FFMPEG-VERSION
+++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION
@@ -1,4 +1,4 @@
LIBNAME=ffmpeg
BASE_URL=https://github.com/xbmc/FFmpeg
-VERSION=4.2.2-Matrix-Alpha1
+VERSION=4.3-Matrix-Alpha1
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz