FFMPEG 3.4.1

Now with DebugInfo package
This commit is contained in:
miqlas
2018-01-07 09:02:21 +01:00
committed by Adrien Destugues
parent a9ff719e3d
commit 9fc8e79c34
2 changed files with 167 additions and 24 deletions

View File

@@ -9,7 +9,7 @@ LICENSE="GNU LGPL v2.1
GNU GPL v2"
REVISION="3"
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
CHECKSUM_SHA256="aeee06e4d8b18d852c61ebbfe5e1bb7014b1e118e8728c1c2115f91e51bffbef"
CHECKSUM_SHA256="5a77278a63741efa74e26bf197b9bb09ac6381b9757391b922407210f0f991c0"
PATCHES="ffmpeg-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
@@ -17,22 +17,21 @@ SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86" #do we really need !x86_gcc2 in here?
PROVIDES="
ffmpeg$secondaryArchSuffix = $portVersion compat >= 3.2
lib:libavutil$secondaryArchSuffix = 55.78.100 compat >= 55
lib:libavcodec$secondaryArchSuffix = 57.107.100 compat >= 57
lib:libavformat$secondaryArchSuffix = 57.83.100 compat >= 57
lib:libavfilter$secondaryArchSuffix = 6.107.100 compat >= 6
lib:libavformat$secondaryArchSuffix = 57.83.100 compat >= 57
lib:libavresample$secondaryArchSuffix = 3.7.0 compat >= 3
lib:libswscale$secondaryArchSuffix = 4.8.100 compat >= 4
lib:libswresample$secondaryArchSuffix = 2.9.100 compat >= 2
lib:libavutil$secondaryArchSuffix = 55.78.100 compat >= 55
lib:libpostproc$secondaryArchSuffix = 54.7.100 compat >= 54
lib:libswresample$secondaryArchSuffix = 2.9.100 compat >= 2
lib:libswscale$secondaryArchSuffix = 4.8.100 compat >= 4
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libspeex$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix
lib:libtheoradec$secondaryArchSuffix
lib:libtheoraenc$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
@@ -48,45 +47,44 @@ CONFLICTS="
PROVIDES_avdevice="
ffmpeg${secondaryArchSuffix}_avdevice = $portVersion compat >= 3.2
lib:libavdevice$secondaryArchSuffix = 57.10.100 compat >= 57
"
"
REQUIRES_avdevice="
haiku$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix == 57.107.100
lib:libavfilter$secondaryArchSuffix == 6.107.100
lib:libavformat$secondaryArchSuffix == 57.83.100
lib:libavutil$secondaryArchSuffix == 55.78.100
"
lib:libSDL2_2.0$secondaryArchSuffix
"
PROVIDES_tools="
ffmpeg${secondaryArchSuffix}_ffplay = $portVersion
cmd:ffplay = $portVersion compat >= 3.2
cmd:ffmpeg = $portVersion compat >= 3.2
cmd:ffplay = $portVersion compat >= 3.2
cmd:ffprobe = $portVersion compat >= 3.2
cmd:ffserver = $portVersion compat >= 3.2
"
"
REQUIRES_tools="
haiku$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix == 57.107.100
lib:libavdevice$secondaryArchSuffix == 57.10.100
lib:libavfilter$secondaryArchSuffix == 6.107.100
lib:libavformat$secondaryArchSuffix == 57.83.100
lib:libavutil$secondaryArchSuffix == 55.78.100
"
lib:libSDL2_2.0$secondaryArchSuffix
"
PROVIDES_devel="
ffmpeg${secondaryArchSuffix}_devel = $portVersion compat >= 3.2
devel:libavutil$secondaryArchSuffix = 55.78.100 compat >= 55
devel:libavcodec$secondaryArchSuffix = 57.107.100 compat >= 57
devel:libavformat$secondaryArchSuffix = 57.83.100 compat >= 57
devel:libavdevice$secondaryArchSuffix = 57.10.100 compat >= 57
devel:libavfilter$secondaryArchSuffix = 6.107.100 compat >= 6
devel:libavformat$secondaryArchSuffix = 57.83.100 compat >= 57
devel:libavresample$secondaryArchSuffix = 3.7.0 compat >= 3
devel:libswscale$secondaryArchSuffix = 4.8.100 compat >= 4
devel:libswresample$secondaryArchSuffix = 2.9.100 compat >= 2
devel:libavutil$secondaryArchSuffix = 55.78.100 compat >= 55
devel:libpostproc$secondaryArchSuffix = 54.7.100 compat >= 54
devel:libswresample$secondaryArchSuffix = 2.9.100 compat >= 2
devel:libswscale$secondaryArchSuffix = 4.8.100 compat >= 4
"
REQUIRES_devel="
ffmpeg$secondaryArchSuffix == $portVersion base
@@ -110,11 +108,11 @@ BUILD_REQUIRES="
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix >= 5
cmd:ld$secondaryArchSuffix
cmd:awk
cmd:cmp
cmd:gcc$secondaryArchSuffix >= 5
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
@@ -140,6 +138,26 @@ PATCH()
doc/texi2pod.pl
}
defineDebugInfoPackage ffmpeg$secondaryArchSuffix \
$libDir/libavcodec.so.57.107.100 \
$libDir/libavfilter.so.6.107.100 \
$libDir/libavformat.so.57.83.100 \
$libDir/libavresample.so.3.7.0 \
$libDir/libavutil.so.55.78.100 \
$libDir/libpostproc.so.54.7.100 \
$libDir/libswresample.so.2.9.100 \
$libDir/libswscale.so.4.8.100
# Can't get them working
#defineDebugInfoPackage ffmpeg${secondaryArchSuffix}_avdevice \
# $libDir/libavdevice.so.57.10.100
#defineDebugInfoPackage ffmpeg${secondaryArchSuffix}_tools \
# $prefix/bin/ffmpeg \
# $prefix/bin/ffplay \
# $prefix/bin/ffprobe \
# $prefix/bin/ffserver
BUILD()
{
# not an autotools configure
@@ -159,7 +177,8 @@ BUILD()
--enable-libtheora \
--enable-libvpx \
--enable-gpl \
--enable-avresample
--enable-avresample \
--disable-stripping
make $jobArgs
}
@@ -175,9 +194,10 @@ INSTALL()
libavformat \
libavresample \
libavutil \
libpostproc \
libswresample \
libswscale \
libpostproc
libswscale
fixPkgconfig
# The pkgconfig file reference other libraries using the wrong paths, which

View File

@@ -0,0 +1,123 @@
From a3a73c183d740c6b9e3f52dc26e401ca2a0ad11b Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 16 Oct 2017 18:31:07 +0200
Subject: disable ebx on x86.
diff --git a/configure b/configure
index 18d80ee..1547cf8 100755
--- a/configure
+++ b/configure
@@ -6594,6 +6594,7 @@ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pt
if test $target_os = "haiku"; then
disable memalign
disable posix_memalign
+ enabled x86_32 && enabled shared && disable ebx_available
fi
# add_dep lib dep
--
2.14.2
From 54d69f3a0979721f61b46c3beb13c50b8836ae62 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Fri, 27 Oct 2017 20:46:28 +0200
Subject: lavf/avio: temporarily accept 0 as EOF.
Print a warning to let applicatios fix their use.
After a deprecation period, check with a low-level assert.
Also make the constraint explicit in the doxygen comment.
Signed-off-by: Nicolas George <george@nsup.org>
diff --git a/libavformat/avio.h b/libavformat/avio.h
index f9c5972..250cf90 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -452,6 +452,8 @@ void avio_free_directory_entry(AVIODirEntry **entry);
* @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.
* @param opaque An opaque pointer to user-specific data.
* @param read_packet A function for refilling the buffer, may be NULL.
+ * For stream protocols, must never return 0 but rather
+ * a proper AVERROR code.
* @param write_packet A function for writing the buffer contents, may be NULL.
* The function may not change the input buffers content.
* @param seek A function for seeking to specified byte position, may be NULL.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 636cb46..a862d27 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -531,6 +531,24 @@ void avio_write_marker(AVIOContext *s, int64_t time, enum AVIODataMarkerType typ
s->last_time = time;
}
+static int read_packet_wrapper(AVIOContext *s, uint8_t *buf, int size)
+{
+ int ret;
+
+ if (!s->read_packet)
+ return AVERROR_EOF;
+ ret = s->read_packet(s->opaque, buf, size);
+#if FF_API_OLD_AVIO_EOF_0
+ if (!ret && !s->max_packet_size) {
+ av_log(NULL, AV_LOG_WARNING, "Invalid return value 0 for stream protocol\n");
+ ret = AVERROR_EOF;
+ }
+#else
+ av_assert2(ret || s->max_packet_size);
+#endif
+ return ret;
+}
+
/* Input stream */
static void fill_buffer(AVIOContext *s)
@@ -569,10 +587,7 @@ static void fill_buffer(AVIOContext *s)
len = s->orig_buffer_size;
}
- if (s->read_packet)
- len = s->read_packet(s->opaque, dst, len);
- else
- len = 0;
+ len = read_packet_wrapper(s, dst, len);
if (len <= 0) {
/* do not modify buffer if EOF reached so that a seek back can
be done without rereading data */
@@ -644,8 +659,7 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size)
if (len == 0 || s->write_flag) {
if((s->direct || size > s->buffer_size) && !s->update_checksum) {
// bypass the buffer and read data directly into buf
- if(s->read_packet)
- len = s->read_packet(s->opaque, buf, size);
+ len = read_packet_wrapper(s, buf, size);
if (len <= 0) {
/* do not modify buffer if EOF reached so that a seek back can
@@ -711,7 +725,7 @@ int avio_read_partial(AVIOContext *s, unsigned char *buf, int size)
return -1;
if (s->read_packet && s->write_flag) {
- len = s->read_packet(s->opaque, buf, size);
+ len = read_packet_wrapper(s, buf, size);
if (len > 0)
s->pos += len;
return len;
diff --git a/libavformat/version.h b/libavformat/version.h
index 878917d..ba400e1 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -97,6 +97,9 @@
#ifndef FF_API_OLD_ROTATE_API
#define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 58)
#endif
+#ifndef FF_API_OLD_AVIO_EOF_0
+#define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 58)
+#endif
#ifndef FF_API_R_FRAME_RATE
--
2.14.2