diff options
author | kfg | 2018-02-13 15:05:42 +0100 |
---|---|---|
committer | kfg | 2018-02-13 16:43:02 +0100 |
commit | b22cfd038e08df4116604a38ac4399cfc5fabe6f (patch) | |
tree | 347ea1b12fd189cbd8ac58fba26c86adef0f19d9 | |
parent | a888f18dd5dfedabe12fc6bc72c19b0d5bd3a0ac (diff) | |
download | aur-b22cfd038e08df4116604a38ac4399cfc5fabe6f.tar.gz |
upgpkg: mingw-w64-ffmpeg 1:3.4.2-1
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | fs56089.patch | 84 |
3 files changed, 110 insertions, 14 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Fri Oct 27 08:29:18 UTC 2017 +# Tue Feb 13 15:42:53 UTC 2018 pkgbase = mingw-w64-ffmpeg pkgdesc = Complete solution to record, convert and stream audio and video (mingw-w64) - pkgver = 3.4 + pkgver = 3.4.2 pkgrel = 1 epoch = 1 url = http://ffmpeg.org/ @@ -26,6 +26,7 @@ pkgbase = mingw-w64-ffmpeg depends = mingw-w64-libtheora depends = mingw-w64-vid.stab depends = mingw-w64-libwebp + depends = mingw-w64-libxml2 depends = mingw-w64-libvorbis depends = mingw-w64-libvpx depends = mingw-w64-opencore-amr @@ -41,10 +42,12 @@ pkgbase = mingw-w64-ffmpeg options = !strip options = !buildflags options = staticlibs - source = https://ffmpeg.org/releases/ffmpeg-3.4.tar.xz - source = https://ffmpeg.org/releases/ffmpeg-3.4.tar.xz.asc - sha256sums = aeee06e4d8b18d852c61ebbfe5e1bb7014b1e118e8728c1c2115f91e51bffbef + source = https://ffmpeg.org/releases/ffmpeg-3.4.2.tar.xz + source = https://ffmpeg.org/releases/ffmpeg-3.4.2.tar.xz.asc + source = fs56089.patch + sha256sums = 2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740 sha256sums = SKIP + sha256sums = 0bfcd12d1992903f21c146ae56d9ad89b52818cfb2303197ee905347c25a5427 pkgname = mingw-w64-ffmpeg @@ -1,35 +1,42 @@ # Maintainer : Karl-Felix Glatzer <karl.glatzer@gmx.de> pkgname=mingw-w64-ffmpeg -pkgver=3.4 +pkgver=3.4.2 pkgrel=1 epoch=1 pkgdesc="Complete solution to record, convert and stream audio and video (mingw-w64)" arch=('any') url="http://ffmpeg.org/" license=('GPL3') -#TODO: Needs fixed mingw-w64-netcdf package -#'mingw-w64-netcdf' 'mingw-w64-opencore-amr' 'mingw-w64-openjpeg' 'mingw-w64-opus' 'mingw-w64-libssh' depends=( 'mingw-w64-crt' 'mingw-w64-bzip2' 'mingw-w64-fontconfig' 'mingw-w64-fribidi' 'mingw-w64-gmp' 'mingw-w64-gnutls' 'mingw-w64-gsm' 'mingw-w64-lame' 'mingw-w64-libass' 'mingw-w64-libbluray' 'mingw-w64-libmodplug' -'mingw-w64-libsoxr' 'mingw-w64-libtheora' 'mingw-w64-vid.stab' 'mingw-w64-libwebp' 'mingw-w64-libvorbis' 'mingw-w64-libvpx' +'mingw-w64-libsoxr' 'mingw-w64-libtheora' 'mingw-w64-vid.stab' 'mingw-w64-libwebp' 'mingw-w64-libxml2' 'mingw-w64-libvorbis' 'mingw-w64-libvpx' 'mingw-w64-opencore-amr' 'mingw-w64-openjpeg2' 'mingw-w64-opus' 'mingw-w64-libssh' 'mingw-w64-sdl2' 'mingw-w64-speex' 'mingw-w64-x264' 'mingw-w64-xvidcore' 'mingw-w64-zlib' 'mingw-w64-x265' ) options=(!strip !buildflags staticlibs) makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'yasm') -source=(https://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz{,.asc}) +source=(https://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz{,.asc} + 'fs56089.patch') validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8') -sha256sums=('aeee06e4d8b18d852c61ebbfe5e1bb7014b1e118e8728c1c2115f91e51bffbef' - 'SKIP') +sha256sums=('2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740' + 'SKIP' + '0bfcd12d1992903f21c146ae56d9ad89b52818cfb2303197ee905347c25a5427') _architectures="i686-w64-mingw32 x86_64-w64-mingw32" +prepare() { + cd ffmpeg-${pkgver} + + # https://bugs.archlinux.org/task/56089 + # Backport of http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=a606f27f4c610708fa96e35eed7b7537d3d8f712 + patch -Np1 -i ../fs56089.patch +} + build() { for _arch in ${_architectures}; do mkdir -p "${srcdir}"/build-${_arch} && cd "${srcdir}"/build-${_arch} - #TODO: Add --enable-netcdf (under --enable-libxvid) when mingw-w64-netcdf Package is fixed "${srcdir}"/ffmpeg-${pkgver}/configure \ --prefix="/usr/${_arch}" \ --enable-cross-compile \ @@ -66,11 +73,13 @@ build() { --enable-libwebp \ --enable-libx264 \ --enable-libx265 \ + --enable-libxml2 \ --enable-libxvid \ --enable-zlib \ --enable-shared \ --enable-version3 \ - --disable-doc + --disable-doc \ + --x86asmexe=yasm make done diff --git a/fs56089.patch b/fs56089.patch new file mode 100644 index 000000000000..6aca38f9f96c --- /dev/null +++ b/fs56089.patch @@ -0,0 +1,84 @@ +diff -rupN ffmpeg-3.4.orig/libavformat/aviobuf.c ffmpeg-3.4/libavformat/aviobuf.c +--- ffmpeg-3.4.orig/libavformat/aviobuf.c 2017-11-02 14:57:16.078834563 +0100 ++++ ffmpeg-3.4/libavformat/aviobuf.c 2017-11-02 15:02:52.549816990 +0100 +@@ -531,6 +531,24 @@ void avio_write_marker(AVIOContext *s, i + 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 c + 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, un + 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 -rupN ffmpeg-3.4.orig/libavformat/avio.h ffmpeg-3.4/libavformat/avio.h +--- ffmpeg-3.4.orig/libavformat/avio.h 2017-11-02 14:57:16.078834563 +0100 ++++ ffmpeg-3.4/libavformat/avio.h 2017-11-02 14:59:15.602300896 +0100 +@@ -452,6 +452,8 @@ void avio_free_directory_entry(AVIODirEn + * @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 -rupN ffmpeg-3.4.orig/libavformat/version.h ffmpeg-3.4/libavformat/version.h +--- ffmpeg-3.4.orig/libavformat/version.h 2017-11-02 14:57:16.082167807 +0100 ++++ ffmpeg-3.4/libavformat/version.h 2017-11-02 15:04:01.704627612 +0100 +@@ -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 |