summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-06-29 04:11:37 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-06-29 04:11:37 +0000
commit58beaea4e8efc53ea238eedf446ec5d8c1cd5fdb (patch)
treed00ff5b736b1188b0c39f0a90e251e71c9bb70ae
parentf62112e9664a5448ebcceb9e4b851d65f2361a5c (diff)
Sun Jun 29 04:05:35 UTC 2014
-rw-r--r--community/erlang/PKGBUILD8
-rw-r--r--community/gnome-commander/PKGBUILD5
-rw-r--r--community/gnome-commander/gnome-commander.changelog3
-rw-r--r--community/homebank/PKGBUILD5
-rw-r--r--community/homebank/homebank.changelog3
-rw-r--r--community/lz4/PKGBUILD4
-rw-r--r--community/pinot/PKGBUILD46
-rw-r--r--community/pinot/namespace_clash.patch12
-rw-r--r--community/pinot/pinot.changelog3
-rw-r--r--community/python-xapian/PKGBUILD35
-rw-r--r--community/python2-xapian/PKGBUILD35
-rw-r--r--community/stardict/PKGBUILD24
-rw-r--r--community/stardict/zlib.patch35
-rw-r--r--community/tellico/PKGBUILD20
-rw-r--r--community/tellico/tellico.changelog3
-rw-r--r--core/gcc/PKGBUILD17
-rw-r--r--core/gcc/gcc-4.9-isl-0.13-hack.patch71
-rw-r--r--core/kmod/PKGBUILD6
-rw-r--r--extra/gst-libav/PKGBUILD16
-rw-r--r--extra/gst-libav/update-libav.patch2304
-rw-r--r--extra/hyphen/PKGBUILD11
-rw-r--r--extra/libmythes/PKGBUILD14
-rw-r--r--extra/xf86-video-modesetting/PKGBUILD8
23 files changed, 2530 insertions, 158 deletions
diff --git a/community/erlang/PKGBUILD b/community/erlang/PKGBUILD
index 49bd4e134..cc335df72 100644
--- a/community/erlang/PKGBUILD
+++ b/community/erlang/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 109150 2014-04-10 21:18:19Z arodseth $
+# $Id: PKGBUILD 113711 2014-06-28 15:47:26Z arodseth $
# Maintainer: Lukas Fleischer <archlinux@cryptocrack.de>
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Vesa Kaihlavirta <vesa@archlinux.org>
@@ -8,7 +8,7 @@
pkgbase=erlang
pkgname=('erlang' 'erlang-unixodbc')
-pkgver=17.0
+pkgver=17.1
pkgrel=1
arch=('x86_64' 'i686')
url='http://www.erlang.org/'
@@ -20,8 +20,8 @@ source=("http://www.erlang.org/download/otp_src_$pkgver.tar.gz"
'epmd.service'
'epmd.socket'
'epmd.conf')
-sha256sums=('297f2baaa65e5ed1c2492c500fe191bff852217ad57af5da2470a3218c9acadb'
- 'acf72b5876c6f505191a3fb57b7e672733f911141929c4cef050111cf8f8b399'
+sha256sums=('b806f5b2b5cc2d0c0d5dd1a65657c21c10dc3a0535ef60adecdac9cd73b9c356'
+ '4a230277f135e3730593e7bffdd5ca92596568340f02a5b3134f1d083b34eaab'
'b121ec9053fb37abca5f910a81c526f93ec30fe13b574a12209223b346886a9e'
'998a759e4cea4527f9d9b241bf9f32527d7378d63ea40afa38443c6c3ceaea34'
'78ce5e67b21758c767d727e56b20502f75dc4385ff9b6c6db312d8e8506f2df2')
diff --git a/community/gnome-commander/PKGBUILD b/community/gnome-commander/PKGBUILD
index cc332ae86..510c5ce4b 100644
--- a/community/gnome-commander/PKGBUILD
+++ b/community/gnome-commander/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 111817 2014-05-25 09:22:34Z jlichtblau $
+# $Id: PKGBUILD 113706 2014-06-28 14:41:54Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
@@ -6,7 +6,7 @@
# Contributor: Johannes Sjolund <j.sjolund@gmail.com>
pkgname=gnome-commander
-pkgver=1.4.2
+pkgver=1.4.3
pkgrel=1
pkgdesc='Graphical two-pane filemanager for Gnome'
arch=('i686' 'x86_64')
@@ -43,3 +43,4 @@ package() {
}
# vim:set ts=2 sw=2 et:
+sha256sums=('159893bd94d2b8190026f97c1f4bee2b6dd089e482636f9454fee9ec95c7fcb7')
diff --git a/community/gnome-commander/gnome-commander.changelog b/community/gnome-commander/gnome-commander.changelog
index e397c2d5b..a9063f766 100644
--- a/community/gnome-commander/gnome-commander.changelog
+++ b/community/gnome-commander/gnome-commander.changelog
@@ -1,3 +1,6 @@
+2014-06-28 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * gnome-commander 1.4.3-1
+
2014-05-25 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
* gnome-commander 1.4.2-1
diff --git a/community/homebank/PKGBUILD b/community/homebank/PKGBUILD
index 55163296f..93c699796 100644
--- a/community/homebank/PKGBUILD
+++ b/community/homebank/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 106400 2014-03-02 14:11:46Z jlichtblau $
+# $Id: PKGBUILD 113704 2014-06-28 14:34:51Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=homebank
-pkgver=4.5.6
+pkgver=4.6.1
pkgrel=1
pkgdesc="Free, easy, personal accounting for everyone"
arch=('i686' 'x86_64')
@@ -28,3 +28,4 @@ package() {
make DESTDIR="${pkgdir}" install
}
+sha256sums=('f8f5d02eeff4a247bc1951e20b50ba2cec335842f12de0cac860c060dd59c97d')
diff --git a/community/homebank/homebank.changelog b/community/homebank/homebank.changelog
index 7a2c25a32..8477773f2 100644
--- a/community/homebank/homebank.changelog
+++ b/community/homebank/homebank.changelog
@@ -1,3 +1,6 @@
+2014-06-28 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * homebank 4.6.1-1
+
2014-03-02 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
* homebank 4.5.6-1
diff --git a/community/lz4/PKGBUILD b/community/lz4/PKGBUILD
index 29d0f6da3..4f696d79a 100644
--- a/community/lz4/PKGBUILD
+++ b/community/lz4/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 110732 2014-05-05 22:12:01Z seblu $
+# $Id: PKGBUILD 113690 2014-06-27 23:36:49Z seblu $
# Maintainer: Sébastien Luttringer
# Contacted by mail, author use svn commit as release version.
# He only push tested release code into svn and support using revision as version
pkgname=lz4
-pkgver=117
+pkgver=118
pkgrel=1
pkgdesc='Very fast lossless compression algorithm'
arch=('i686' 'x86_64')
diff --git a/community/pinot/PKGBUILD b/community/pinot/PKGBUILD
index d713e14de..b4f97f596 100644
--- a/community/pinot/PKGBUILD
+++ b/community/pinot/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 104802 2014-01-26 12:17:40Z andyrtr $
+# $Id: PKGBUILD 113713 2014-06-28 16:17:15Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: William Rea <sillywilly@gmail.com>
@@ -6,8 +6,8 @@
# Contributor: Alexander Rødseth <rodseth@gmail.com>
pkgname=pinot
-pkgver=1.06
-pkgrel=3
+pkgver=1.07
+pkgrel=1
pkgdesc='Personal search and metasearch tool'
arch=('i686' 'x86_64')
url='http://code.google.com/p/pinot-search/'
@@ -15,7 +15,7 @@ license=('GPL')
depends=('gtkmm3' 'xapian-core' 'libtextcat' 'sqlite' 'libxml++' 'curl' 'gmime'
'dbus-glib' 'shared-mime-info' 'libexif' 'taglib' 'hicolor-icon-theme'
'cairo' 'exiv2' 'boost-libs')
-makedepends=('boost' 'desktop-file-utils')
+makedepends=('boost' 'desktop-file-utils' 'svn' 'autoconf' 'automake')
optdepends=('unzip: ZIP files extraction'
'poppler: PDF to text conversion'
'catdvi: DVI to text conversion'
@@ -26,12 +26,23 @@ optdepends=('unzip: ZIP files extraction'
options=('!emptydirs')
install=$pkgname.install
changelog=$pkgname.changelog
-source=(http://pinot-search.googlecode.com/files/$pkgname-$pkgver.tar.gz namespace_clash.patch)
-sha256sums=('bba6f412553890ef7cccd6d7bb28df9a6c4d122ea74a2902e5de33953cd1872d'
- '7b4fee7b43f73539803954075af2ce577b65ca732ab8115d257068ffaa5a750f')
+source=()
+sha256sums=()
+
+_svntrunk=http://pinot-search.googlecode.com/svn/tags/v${pkgver}
+
+prepare() {
+ cd "${srcdir}"
+
+ msg "Connecting to SVN server...."
+ svn co "$_svntrunk"
+ msg "SVN checkout done or server timeout"
+
+ msg "Starting build..."
+ rm -rf "${srcdir}/${pkgver}-build"
+ svn export "${srcdir}/v${pkgver}" "${srcdir}/${pkgver}-build"
+ cd "${srcdir}/${pkgver}-build"
-build() {
- cd $srcdir/$pkgname-$pkgver
x='/usr/share/libtextcat/'
sed -i 's|/LM/russian.lm|/LM/russian-windows1251.lm|' textcat_conf.txt
sed -i "s|$x|${x}LM/|" \
@@ -43,22 +54,29 @@ build() {
${x}LM/russian-koi8_r.lm russian-koi8_r\n\
${x}LM/russian-windows1251.lm russian-windows1251|" textcat3_conf.txt
- patch -Np1 -i $srcdir/namespace_clash.patch
+#configure to be run with the desired below args
+ sed -i '$s/^/#/' autogen.sh
+}
+
+build() {
+ cd "${srcdir}/${pkgver}-build"
+ ./autogen.sh
+
LIBS="-lboost_system" ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib \
- --enable-gtkmm3=yes \
- --enable-mempool=no
+ --enable-gtkmm3=yes
+
make
}
package() {
- cd $srcdir/$pkgname-$pkgver
+ cd "${srcdir}/${pkgver}-build"
- make DESTDIR=$pkgdir install
+ make DESTDIR="${pkgdir}" install
}
# vim:set ts=2 sw=2 et:
diff --git a/community/pinot/namespace_clash.patch b/community/pinot/namespace_clash.patch
deleted file mode 100644
index 40d7c9eac..000000000
--- a/community/pinot/namespace_clash.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -aur pinot-1.06/UI/GTK2/src/mainWindow.cc pinot-1.06.new/UI/GTK2/src/mainWindow.cc
---- pinot-1.06/UI/GTK2/src/mainWindow.cc 2013-01-14 13:47:06.000000000 +0100
-+++ pinot-1.06.new/UI/GTK2/src/mainWindow.cc 2013-11-30 19:22:17.792587309 +0100
-@@ -1766,7 +1766,7 @@
- viewDoc = true;
- }
-
-- close(inFd);
-+ ::close(inFd);
- }
-
- if (viewDoc == true)
diff --git a/community/pinot/pinot.changelog b/community/pinot/pinot.changelog
index 4cf1a68a2..d65e94dcf 100644
--- a/community/pinot/pinot.changelog
+++ b/community/pinot/pinot.changelog
@@ -1,3 +1,6 @@
+2014-06-28 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * pinot 1.07-1
+
2012-09-29 Alexander Rødseth <rodseth@gmail.com>
* fix FS#31510, adding --enable-mempool=no
diff --git a/community/python-xapian/PKGBUILD b/community/python-xapian/PKGBUILD
new file mode 100644
index 000000000..75e33ae6f
--- /dev/null
+++ b/community/python-xapian/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 113692 2014-06-28 02:38:09Z fyan $
+# Maintainer: Felix Yan <felixonmars@gmail.com>
+# Contributor: DonVla <donvla/users.sourceforge/net>
+# Contributor: Hervé Cauwelier <herve/oursours/net>
+
+pkgbase=python-xapian
+pkgname=('python2-xapian')
+_realname=xapian-bindings
+pkgver=1.2.18
+epoch=1
+pkgrel=1
+pkgdesc="Python bindings for Xapian"
+arch=('i686' 'x86_64')
+url="http://xapian.org/docs/bindings/python/"
+license=('GPL')
+makedepends=('python' 'python2' "xapian-core=$epoch:$pkgver")
+source=("http://oligarchy.co.uk/xapian/${pkgver}/${_realname}-${pkgver}.tar.xz")
+
+build() {
+ cd "$srcdir/${_realname}-$pkgver"
+ ./configure XAPIAN_CONFIG=/usr/bin/xapian-config \
+ --prefix=/usr --with-python \
+ PYTHON=/usr/bin/python2
+ make
+}
+
+package_python2-xapian() {
+ depends=('python2' "xapian-core=$epoch:$pkgver")
+
+ cd ${_realname}-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
+sha512sums=('c0c417130bfaa3f059a003cacaa129662b216704d2f4bdfd997e1d2c0d74a77385f9f79b6ed5e3fb63b5217f78ebd43826fbee9c00f81264089728a02cffbd30')
diff --git a/community/python2-xapian/PKGBUILD b/community/python2-xapian/PKGBUILD
deleted file mode 100644
index 2b3a0b85d..000000000
--- a/community/python2-xapian/PKGBUILD
+++ /dev/null
@@ -1,35 +0,0 @@
-# $Id: PKGBUILD 105927 2014-02-19 11:00:34Z fyan $
-# Maintainer: Felix Yan <felixonmars@gmail.com>
-# Contributor: DonVla <donvla/users.sourceforge/net>
-# Contributor: Hervé Cauwelier <herve/oursours/net>
-
-pkgname=python2-xapian
-_realname=xapian-bindings
-pkgver=1.2.17
-epoch=1
-pkgrel=1
-pkgdesc="Python bindings for Xapian"
-arch=(i686 x86_64)
-url="http://xapian.org/docs/bindings/python/"
-license=('GPL')
-depends=('python2' "xapian-core=$epoch:$pkgver")
-source=("http://oligarchy.co.uk/xapian/${pkgver}/${_realname}-${pkgver}.tar.xz")
-
-build() {
- cd ${_realname}-$pkgver
-
- LDFLAGS=-lpython2.7 ./configure XAPIAN_CONFIG=/usr/bin/xapian-config \
- --prefix=/usr --with-python \
- PYTHON=/usr/bin/python2
-
- make
-}
-
-package() {
- cd ${_realname}-$pkgver
-
- make DESTDIR="$pkgdir" install
-}
-
-# vim:set ts=2 sw=2 et:
-sha512sums=('4c8348ece62b57c4442e8cb16282b7da2a8ebecaf99eefbb263795c1451f1395c2073ea311df0159e74a4d52029682034926526b17554627cf8e286f328f36a7')
diff --git a/community/stardict/PKGBUILD b/community/stardict/PKGBUILD
index 03d6b3999..4bd06779c 100644
--- a/community/stardict/PKGBUILD
+++ b/community/stardict/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 99992 2013-10-31 02:53:04Z allan $
+# $Id: PKGBUILD 113721 2014-06-28 18:11:12Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>
@@ -7,30 +7,28 @@
pkgbase=stardict
pkgname=(stardict stardict-lite)
-pkgver=3.0.4
-pkgrel=3
+pkgver=3.0.5
+pkgrel=1
arch=('i686' 'x86_64')
url='http://www.stardict.org/'
license=('GPL')
makedepends=('intltool' 'popt' 'gnome-doc-utils' 'gnome-common' 'libmariadbclient' 'enchant' 'gtk2' 'libsigc++' 'libsm' 'espeak' 'libgnome')
options=('!emptydirs')
-source=("http://stardict-3.googlecode.com/files/${pkgbase}-${pkgver}.tar.bz2"
+source=("http://downloads.sourceforge.net/project/stardict-4/$pkgver/$pkgbase-$pkgver.tar.bz2"
'gcc46.patch'
- 'glib2.patch'
- 'zlib.patch')
+ 'glib2.patch')
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
patch -p1 -i ../gcc46.patch
patch -p1 -i ../glib2.patch
- patch -p1 -i ../zlib.patch
cp -r "${srcdir}/${pkgbase}-${pkgver}" "${srcdir}/${pkgbase}-${pkgver}-lite"
cd "${srcdir}/${pkgbase}-${pkgver}"
+ ./autogen.sh
./configure \
- PKG_CONFIG=/usr/bin/pkg-config \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
@@ -41,9 +39,8 @@ build() {
make
cd "${srcdir}/${pkgbase}-${pkgver}-lite"
- LDFLAGS="$LDFLAGS -lgmodule-2.0"
+ ./autogen.sh
./configure \
- PKG_CONFIG=/usr/bin/pkg-config \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
@@ -67,14 +64,13 @@ package_stardict() {
package_stardict-lite() {
pkgdesc='International dictionary software - lite version without gnome and espeak support'
depends=('enchant' 'gtk2' 'libsigc++' 'libsm')
- provides=(stardict)
+ provides=("stardict=$pkgver")
conflicts=(stardict)
cd "${srcdir}/${pkgbase}-${pkgver}-lite"
make DESTDIR="${pkgdir}" install
}
-md5sums=('0a9abf1936c43a3ee255802c75267f1a'
+md5sums=('e5fcf03cbf44d61c4e89ab3e7a70ec39'
'52ff47441c503de07add4b7688510bc5'
- 'b2f216897c9053c7e4666c3d78705cf1'
- 'ee26dce70fc83b3ce86e5100fede7fad')
+ 'b2f216897c9053c7e4666c3d78705cf1')
diff --git a/community/stardict/zlib.patch b/community/stardict/zlib.patch
deleted file mode 100644
index eb5a9a12a..000000000
--- a/community/stardict/zlib.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -Naur old/lib/src/libcommon.cpp new/lib/src/libcommon.cpp
---- old/lib/src/libcommon.cpp 2012-07-12 11:33:30.343333334 +0000
-+++ new/lib/src/libcommon.cpp 2012-07-12 11:34:05.006568754 +0000
-@@ -614,7 +614,7 @@
- return EXIT_FAILURE;
- }
- while(true) {
-- len = gzread(get_impl(in), buf, buffer_size);
-+ len = gzread((gzFile)get_impl(in), buf, buffer_size);
- if(len < 0) {
- g_critical(read_file_err, arch_file_name, "");
- return EXIT_FAILURE;
-@@ -871,3 +871,8 @@
- return res;
- }
- }
-+
-+int gzclose_compat(void * file)
-+{
-+ return gzclose ((gzFile)file);
-+}
-diff -Naur old/lib/src/libcommon.h new/lib/src/libcommon.h
---- old/lib/src/libcommon.h 2012-07-12 11:33:30.343333334 +0000
-+++ new/lib/src/libcommon.h 2012-07-12 11:34:05.006568754 +0000
-@@ -187,8 +187,9 @@
- typedef ResourceWrapper<FILE, FILE*, int, fclose> File;
- }
-
-+extern int gzclose_compat(void * file);
- namespace zip {
--typedef ResourceWrapper<void, void*, int, gzclose> gzFile;
-+typedef ResourceWrapper<void, void*, int, gzclose_compat> gzFile;
- }
-
- /* Create a new temporary file. Return file name in file name encoding.
diff --git a/community/tellico/PKGBUILD b/community/tellico/PKGBUILD
index b8d2ed660..d430c45cc 100644
--- a/community/tellico/PKGBUILD
+++ b/community/tellico/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 106856 2014-03-09 12:28:17Z andrea $
+# $Id: PKGBUILD 113716 2014-06-28 16:53:12Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Ray Rashif <schiv@archlinux.org
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
pkgname=tellico
-pkgver=2.3.8
-pkgrel=5
+pkgver=2.3.9
+pkgrel=1
pkgdesc="A collection manager for KDE"
arch=('i686' 'x86_64')
url="http://tellico-project.org/"
@@ -16,23 +16,23 @@ makedepends=('automoc4' 'cmake')
install=$pkgname.install
changelog=$pkgname.changelog
source=(http://tellico-project.org/files/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('2d8a0d06951e0755c7987d0a07cc8157cd42c8b1c143170042183ff1e89e2ccb')
+sha256sums=('5184c130ea7561be6e72580105f30d5f160fd2fd5c9ffc7f7e16faf227a20114')
build() {
- cd ${srcdir}
+ cd "${srcdir}"
mkdir build
cd build
- cmake ../${pkgname}-${pkgver} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
- -DWITH_Nepomuk=OFF
+
+ cmake ../${pkgname}-${pkgver} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DWITH_Nepomuk=OFF
make
}
package() {
- cd ${srcdir}/build
+ cd "${srcdir}"/build
- make DESTDIR=${pkgdir} install
+ make DESTDIR="${pkgdir}" install
# fix python 2.7 path
- find ${pkgdir} -iname "*.py" | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
+ find "${pkgdir}" -iname "*.py" | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
}
diff --git a/community/tellico/tellico.changelog b/community/tellico/tellico.changelog
index 620bae737..80c42d126 100644
--- a/community/tellico/tellico.changelog
+++ b/community/tellico/tellico.changelog
@@ -1,3 +1,6 @@
+2014-06-28 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * tellico 2.3.9-1
+
2014-03-09 Andrea Scarpino <andrea@archlinux.org>
* tellico 2.3.8-5 be sure Nepomuk support is disabled
diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD
index f67645362..0a0b826a6 100644
--- a/core/gcc/PKGBUILD
+++ b/core/gcc/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 214996 2014-06-11 11:40:28Z allan $
+# $Id: PKGBUILD 215535 2014-06-28 10:00:36Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -7,7 +7,7 @@
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
pkgver=4.9.0
_pkgver=4.9
-pkgrel=4
+pkgrel=5
_snapshot=4.9-20140604
pkgdesc="The GNU Compiler Collection"
arch=('i686' 'x86_64')
@@ -18,9 +18,11 @@ checkdepends=('dejagnu' 'inetutils')
options=('!emptydirs')
source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
- gcc-4.8-filename-output.patch)
+ gcc-4.8-filename-output.patch
+ gcc-4.9-isl-0.13-hack.patch)
md5sums=('57aa4ff81c56262dc89994853c4d0149'
- '40cb437805e2f7a006aa0d0c3098ab0f')
+ '40cb437805e2f7a006aa0d0c3098ab0f'
+ 'f26ae06b9cbc8abe86f5ee4dc5737da8')
if [ -n "${_snapshot}" ]; then
_basedir=gcc-${_snapshot}
@@ -47,6 +49,10 @@ prepare() {
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653
patch -p0 -i ${srcdir}/gcc-4.8-filename-output.patch
+ # isl-0.13 support - mostly header includes and a function rename
+ # (which does not seem right but causes no testsuite failures...)
+ patch -p1 -i ${srcdir}/gcc-4.9-isl-0.13-hack.patch
+
mkdir ${srcdir}/gcc-build
}
@@ -68,7 +74,8 @@ build() {
--disable-libunwind-exceptions --enable-clocale=gnu \
--disable-libstdcxx-pch --disable-libssp \
--enable-gnu-unique-object --enable-linker-build-id \
- --enable-cloog-backend=isl --disable-cloog-version-check \
+ --enable-cloog-backend=isl \
+ --disable-isl-version-check --disable-cloog-version-check \
--enable-lto --enable-plugin --enable-install-libiberty \
--with-linker-hash-style=gnu \
--disable-multilib --disable-werror \
diff --git a/core/gcc/gcc-4.9-isl-0.13-hack.patch b/core/gcc/gcc-4.9-isl-0.13-hack.patch
new file mode 100644
index 000000000..c2b95d952
--- /dev/null
+++ b/core/gcc/gcc-4.9-isl-0.13-hack.patch
@@ -0,0 +1,71 @@
+diff -Naur gcc-4.9-20140604-old/gcc/graphite-clast-to-gimple.c gcc-4.9-20140604/gcc/graphite-clast-to-gimple.c
+--- gcc-4.9-20140604-old/gcc/graphite-clast-to-gimple.c 2014-03-03 21:39:22.000000000 +1000
++++ gcc-4.9-20140604/gcc/graphite-clast-to-gimple.c 2014-06-25 15:07:57.958697105 +1000
+@@ -28,6 +28,8 @@
+ #include <isl/constraint.h>
+ #include <isl/ilp.h>
+ #include <isl/aff.h>
++#include <isl/deprecated/int.h>
++#include <isl/deprecated/ilp_int.h>
+ #include <cloog/cloog.h>
+ #include <cloog/isl/domain.h>
+ #endif
+diff -Naur gcc-4.9-20140604-old/gcc/graphite-interchange.c gcc-4.9-20140604/gcc/graphite-interchange.c
+--- gcc-4.9-20140604-old/gcc/graphite-interchange.c 2014-01-03 08:23:26.000000000 +1000
++++ gcc-4.9-20140604/gcc/graphite-interchange.c 2014-06-25 15:10:06.882899243 +1000
+@@ -29,6 +29,9 @@
+ #include <isl/map.h>
+ #include <isl/union_map.h>
+ #include <isl/ilp.h>
++#include <isl/deprecated/int.h>
++#include <isl/deprecated/ilp_int.h>
++#include <isl/deprecated/constraint_int.h>
+ #include <cloog/cloog.h>
+ #include <cloog/isl/domain.h>
+ #endif
+diff -Naur gcc-4.9-20140604-old/gcc/graphite-optimize-isl.c gcc-4.9-20140604/gcc/graphite-optimize-isl.c
+--- gcc-4.9-20140604-old/gcc/graphite-optimize-isl.c 2014-01-03 08:23:26.000000000 +1000
++++ gcc-4.9-20140604/gcc/graphite-optimize-isl.c 2014-06-25 15:16:57.038386166 +1000
+@@ -28,6 +28,8 @@
+ #include <isl/band.h>
+ #include <isl/aff.h>
+ #include <isl/options.h>
++#include <isl/deprecated/int.h>
++#include <isl/deprecated/aff_int.h>
+ #endif
+
+ #include "system.h"
+@@ -373,7 +375,7 @@
+ {
+ for (i = ScheduleDimensions - 1 ; i >= 0 ; i--)
+ {
+- if (isl_band_member_is_zero_distance (Band, i))
++ if (isl_band_member_is_coincident (Band, i))
+ {
+ isl_map *TileMap;
+ isl_union_map *TileUMap;
+diff -Naur gcc-4.9-20140604-old/gcc/graphite-poly.c gcc-4.9-20140604/gcc/graphite-poly.c
+--- gcc-4.9-20140604-old/gcc/graphite-poly.c 2014-01-03 08:23:26.000000000 +1000
++++ gcc-4.9-20140604/gcc/graphite-poly.c 2014-06-25 15:18:01.207157796 +1000
+@@ -28,6 +28,8 @@
+ #include <isl/constraint.h>
+ #include <isl/ilp.h>
+ #include <isl/aff.h>
++#include <isl/deprecated/int.h>
++#include <isl/deprecated/ilp_int.h>
+ #include <cloog/cloog.h>
+ #include <cloog/isl/domain.h>
+ #endif
+diff -Naur gcc-4.9-20140604-old/gcc/graphite-sese-to-poly.c gcc-4.9-20140604/gcc/graphite-sese-to-poly.c
+--- gcc-4.9-20140604-old/gcc/graphite-sese-to-poly.c 2014-04-08 20:59:40.000000000 +1000
++++ gcc-4.9-20140604/gcc/graphite-sese-to-poly.c 2014-06-25 15:19:46.575140398 +1000
+@@ -26,6 +26,9 @@
+ #include <isl/union_map.h>
+ #include <isl/constraint.h>
+ #include <isl/aff.h>
++#include <isl/deprecated/int.h>
++#include <isl/deprecated/aff_int.h>
++#include <isl/deprecated/constraint_int.h>
+ #include <cloog/cloog.h>
+ #include <cloog/cloog.h>
+ #include <cloog/isl/domain.h>
diff --git a/core/kmod/PKGBUILD b/core/kmod/PKGBUILD
index 7b26d0742..321764130 100644
--- a/core/kmod/PKGBUILD
+++ b/core/kmod/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 210102 2014-04-09 22:21:57Z thomas $
+# $Id: PKGBUILD 215537 2014-06-28 12:47:01Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgname=kmod
-pkgver=17
+pkgver=18
pkgrel=1
pkgdesc="Linux kernel module handling"
arch=('i686' 'x86_64')
@@ -16,7 +16,7 @@ conflicts=('module-init-tools')
replaces=('module-init-tools')
source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
"depmod-search.conf")
-md5sums=('bc36d28b12dcb2b664a35411560c5610'
+md5sums=('82835c7f01983634e06ca72b4ee30cc6'
'dd62cbf62bd8f212f51ef8c43bec9a77')
build() {
diff --git a/extra/gst-libav/PKGBUILD b/extra/gst-libav/PKGBUILD
index 08ab38427..894604ac0 100644
--- a/extra/gst-libav/PKGBUILD
+++ b/extra/gst-libav/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 211619 2014-04-21 17:03:55Z jgc $
+# $Id: PKGBUILD 215539 2014-06-28 15:39:09Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gst-libav
pkgver=1.2.4
-pkgrel=1
+pkgrel=2
pkgdesc="Gstreamer libav Plugin"
arch=('i686' 'x86_64')
license=('GPL')
@@ -12,8 +12,16 @@ depends=('gst-plugins-base-libs' 'bzip2')
makedepends=('yasm' 'python')
options=(!emptydirs)
provides=("gst-ffmpeg=$pkgver-$pkgrel")
-source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz)
-sha256sums=('2a69480d63fc2db93249d9e2e229ab3541bbc2db881b0f64de13d0bfc7d1f037')
+source=(${url}/src/$pkgname/$pkgname-$pkgver.tar.xz update-libav.patch)
+sha256sums=('2a69480d63fc2db93249d9e2e229ab3541bbc2db881b0f64de13d0bfc7d1f037'
+ '0fa6f8e097b4b6246f14b6db03c2228628135d3a69e6f9fdf527e7e3c72729e1')
+
+prepare() {
+ cd $pkgname-$pkgver
+
+ # Update libav FS#40995 CVE-2014-4609
+ patch -Np1 -i ../update-libav.patch
+}
build() {
cd $pkgname-$pkgver
diff --git a/extra/gst-libav/update-libav.patch b/extra/gst-libav/update-libav.patch
new file mode 100644
index 000000000..fa4988d06
--- /dev/null
+++ b/extra/gst-libav/update-libav.patch
@@ -0,0 +1,2304 @@
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/avconv.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/avconv.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/avconv.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/avconv.c 2014-06-28 17:33:25.350191159 +0200
+@@ -346,6 +346,25 @@
+ bsfc = bsfc->next;
+ }
+
++ if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS) &&
++ ost->last_mux_dts != AV_NOPTS_VALUE &&
++ pkt->dts < ost->last_mux_dts + !(s->oformat->flags & AVFMT_TS_NONSTRICT)) {
++ av_log(NULL, AV_LOG_WARNING, "Non-monotonous DTS in output stream "
++ "%d:%d; previous: %"PRId64", current: %"PRId64"; ",
++ ost->file_index, ost->st->index, ost->last_mux_dts, pkt->dts);
++ if (exit_on_error) {
++ av_log(NULL, AV_LOG_FATAL, "aborting.\n");
++ exit(1);
++ }
++ av_log(NULL, AV_LOG_WARNING, "changing to %"PRId64". This may result "
++ "in incorrect timestamps in the output file.\n",
++ ost->last_mux_dts + 1);
++ pkt->dts = ost->last_mux_dts + 1;
++ if (pkt->pts != AV_NOPTS_VALUE)
++ pkt->pts = FFMAX(pkt->pts, pkt->dts);
++ }
++ ost->last_mux_dts = pkt->dts;
++
+ pkt->stream_index = ost->index;
+ ret = av_interleaved_write_frame(s, pkt);
+ if (ret < 0) {
+@@ -720,6 +739,19 @@
+ return 0;
+ }
+
++static void finish_output_stream(OutputStream *ost)
++{
++ OutputFile *of = output_files[ost->file_index];
++ int i;
++
++ ost->finished = 1;
++
++ if (of->shortest) {
++ for (i = 0; i < of->ctx->nb_streams; i++)
++ output_streams[of->ost_index + i]->finished = 1;
++ }
++}
++
+ /*
+ * Read as many frames from possible from lavfi and encode them.
+ *
+@@ -730,7 +762,7 @@
+ */
+ static int poll_filters(void)
+ {
+- int i, j, ret = 0;
++ int i, ret = 0;
+
+ while (ret >= 0 && !received_sigterm) {
+ OutputStream *ost = NULL;
+@@ -757,15 +789,7 @@
+ ret = poll_filter(ost);
+
+ if (ret == AVERROR_EOF) {
+- OutputFile *of = output_files[ost->file_index];
+-
+- ost->finished = 1;
+-
+- if (of->shortest) {
+- for (j = 0; j < of->ctx->nb_streams; j++)
+- output_streams[of->ost_index + j]->finished = 1;
+- }
+-
++ finish_output_stream(ost);
+ ret = 0;
+ } else if (ret == AVERROR(EAGAIN))
+ return 0;
+@@ -2127,7 +2151,7 @@
+
+ if (ost->source_index == ifile->ist_index + i &&
+ (ost->stream_copy || ost->enc->type == AVMEDIA_TYPE_SUBTITLE))
+- ost->finished= 1;
++ finish_output_stream(ost);
+ }
+ }
+
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/avconv.h gst-libav-1.2.4-9.14/gst-libs/ext/libav/avconv.h
+--- gst-libav-1.2.4/gst-libs/ext/libav/avconv.h 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/avconv.h 2014-06-28 17:33:25.560190269 +0200
+@@ -267,6 +267,8 @@
+ /* pts of the first frame encoded for this stream, used for limiting
+ * recording time */
+ int64_t first_pts;
++ /* dts of the last packet sent to the muxer */
++ int64_t last_mux_dts;
+ AVBitStreamFilterContext *bitstream_filters;
+ AVCodec *enc;
+ int64_t max_frames;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/avconv_opt.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/avconv_opt.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/avconv_opt.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/avconv_opt.c 2014-06-28 17:33:25.560190269 +0200
+@@ -845,6 +845,7 @@
+ av_opt_get_int(o->g->sws_opts, "sws_flags", 0, &ost->sws_flags);
+
+ ost->pix_fmts[0] = ost->pix_fmts[1] = AV_PIX_FMT_NONE;
++ ost->last_mux_dts = AV_NOPTS_VALUE;
+
+ return ost;
+ }
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/Changelog gst-libav-1.2.4-9.14/gst-libs/ext/libav/Changelog
+--- gst-libav-1.2.4/gst-libs/ext/libav/Changelog 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/Changelog 2014-06-28 17:33:25.560190269 +0200
+@@ -1,5 +1,43 @@
+ Releases are sorted from youngest to oldest.
+
++version 9.14:
++- adpcm: Write the proper predictor in trellis mode in IMA QT
++- adpcm: Avoid reading out of bounds in the IMA QT trellis encoder
++- Check mp3 header before calling avpriv_mpegaudio_decode_header() (bug/705)
++- Check if an mp3 header is using a reserved sample rate
++- lzo: Handle integer overflow (bug/704)
++- avconv: make -shortest work with streamcopy
++
++Version 9.13:
++- swscale: Fix an undefined behaviour
++- matroska: add the Opus mapping
++- mp3enc: Properly write bitrate value in XING header (Fixes: debian/736088)
++- origin/pu/9 oggdec: add support for Opus in Ogg demuxing (Fixes: libav/603, debian/720563)
++- apedec: do not buffer decoded samples over AVPackets (Fixes: debian/744901)
++- isom: lpcm in mov default to big endian
++- movdec: handle 0x7fff langcode as macintosh per the specs
++- h264: reset next_output_pic earlier in start_frame() (Fixes: libav/672, debian/741240, ubuntu/1288206)
++- Revert "pthread: flush all threads on flush, not just the first one"
++- rtmpproto: Make sure to pass on the error code if read_connect failed
++- lavr: allocate the resampling buffer with a positive size
++- tiffdec: use bytestream2 to simplify overread/overwrite protection
++- bytestream: add bytestream2_copy_buffer() functions
++- bytestream: add functions for accessing size of buffer
++- resample: fix avresample_get_delay() return value
++- avi: Improve non-interleaved detection (Fixes: libav/666)
++- af_channelmap: fix ONE_STR mapping mode
++- movenc: allow override of "writing application" tag
++- matroskaenc: allow override of "writing application" tag
++- avfilter: Add missing emms_c when needed
++- build: Use pkg-config for openjpeg (Fixes: libav/387)
++- pthread: flush all threads on flush, not just the first one (Fixes: vlc/9665)
++- mpeg12: check scantable indices in all decode_block functions
++- sgidec: fix buffer size check in expand_rle_row()
++- adx: check that the offset is not negative
++- mpegvideo: set reference/pict_type on generated reference frames
++- h264: Fix various crashes found in samples pointed by Mateusz "j00ru" Jurczyk and Gynvael Coldwind - Thanks!
++
++
+ version 9.12:
+ - configure: Update freetype check to follow upstream
+ - drawtext: Drop pointless header
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/cmdutils.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/cmdutils.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/cmdutils.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/cmdutils.c 2014-06-28 17:33:25.560190269 +0200
+@@ -56,7 +56,7 @@
+ struct SwsContext *sws_opts;
+ AVDictionary *format_opts, *codec_opts;
+
+-static const int this_year = 2013;
++static const int this_year = 2014;
+
+ void init_opts(void)
+ {
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/configure gst-libav-1.2.4-9.14/gst-libs/ext/libav/configure
+--- gst-libav-1.2.4/gst-libs/ext/libav/configure 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/configure 2014-06-28 17:33:25.560190269 +0200
+@@ -3499,7 +3499,8 @@
+ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
+ enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
+ enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader
+-enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
++enabled libopenjpeg && { { check_header openjpeg.h && check_lib2 openjpeg.h opj_version -lopenjpeg; } ||
++ { require_pkg_config libopenjpeg1 openjpeg.h opj_version; } }
+ enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create
+ enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new
+ enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/doc/platform.texi gst-libav-1.2.4-9.14/gst-libs/ext/libav/doc/platform.texi
+--- gst-libav-1.2.4/gst-libs/ext/libav/doc/platform.texi 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/doc/platform.texi 2014-06-28 17:33:25.560190269 +0200
+@@ -51,8 +51,8 @@
+ unacelerated code.
+
+ OS X on PowerPC or ARM (iPhone) requires a preprocessor from
+-@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
+-assembler functions. Just download the Perl script and put it somewhere
++@url{git://git.libav.org/gas-preprocessor.git} to build the optimized
++assembler functions. Put the Perl script somewhere
+ in your PATH, Libav's configure will pick it up automatically.
+
+ OS X on AMD64 and x86 requires @command{yasm} to build most of the
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/adpcmenc.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/adpcmenc.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/adpcmenc.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/adpcmenc.c 2014-06-28 17:33:25.560190269 +0200
+@@ -557,10 +557,11 @@
+ put_bits(&pb, 7, status->step_index);
+ if (avctx->trellis > 0) {
+ uint8_t buf[64];
+- adpcm_compress_trellis(avctx, &samples_p[ch][1], buf, status,
++ adpcm_compress_trellis(avctx, &samples_p[ch][0], buf, status,
+ 64, 1);
+ for (i = 0; i < 64; i++)
+ put_bits(&pb, 4, buf[i ^ 1]);
++ status->prev_sample = status->predictor;
+ } else {
+ for (i = 0; i < 64; i += 2) {
+ int t1, t2;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/adx.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/adx.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/adx.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/adx.c 2014-06-28 17:33:25.560190269 +0200
+@@ -48,7 +48,7 @@
+ offset = AV_RB16(buf + 2) + 4;
+
+ /* if copyright string is within the provided data, validate it */
+- if (bufsize >= offset && memcmp(buf + offset - 6, "(c)CRI", 6))
++ if (bufsize >= offset && offset >= 6 && memcmp(buf + offset - 6, "(c)CRI", 6))
+ return AVERROR_INVALIDDATA;
+
+ /* check for encoding=3 block_size=18, sample_size=4 */
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/apedec.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/apedec.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/apedec.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/apedec.c 2014-06-28 17:33:25.560190269 +0200
+@@ -833,7 +833,6 @@
+ int32_t *sample24;
+ int i, ch, ret;
+ int blockstodecode;
+- int bytes_used = 0;
+
+ /* this should never be negative, but bad things will happen if it is, so
+ check it just to make sure. */
+@@ -889,7 +888,6 @@
+ return AVERROR_INVALIDDATA;
+ }
+
+- bytes_used = avpkt->size;
+ }
+
+ if (!s->data) {
+@@ -958,7 +956,7 @@
+ *got_frame_ptr = 1;
+ *(AVFrame *)data = s->frame;
+
+- return bytes_used;
++ return (s->samples == 0) ? avpkt->size : 0;
+ }
+
+ static void ape_flush(AVCodecContext *avctx)
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/arm/h264dsp_init_arm.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/arm/h264dsp_init_arm.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/arm/h264dsp_init_arm.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/arm/h264dsp_init_arm.c 2014-06-28 17:33:25.560190269 +0200
+@@ -88,7 +88,7 @@
+ c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
+ c->h264_idct_add16 = ff_h264_idct_add16_neon;
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_neon;
+ c->h264_idct8_add = ff_h264_idct8_add_neon;
+ c->h264_idct8_dc_add = ff_h264_idct8_dc_add_neon;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/bytestream.h gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/bytestream.h
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/bytestream.h 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/bytestream.h 2014-06-28 17:33:25.560190269 +0200
+@@ -190,6 +190,16 @@
+ return (int)(p->buffer - p->buffer_start);
+ }
+
++static av_always_inline int bytestream2_size(GetByteContext *g)
++{
++ return (int)(g->buffer_end - g->buffer_start);
++}
++
++static av_always_inline int bytestream2_size_p(PutByteContext *p)
++{
++ return (int)(p->buffer_end - p->buffer_start);
++}
++
+ static av_always_inline int bytestream2_seek(GetByteContext *g,
+ int offset,
+ int whence)
+@@ -315,6 +325,32 @@
+ return p->eof;
+ }
+
++static av_always_inline unsigned int bytestream2_copy_bufferu(PutByteContext *p,
++ GetByteContext *g,
++ unsigned int size)
++{
++ memcpy(p->buffer, g->buffer, size);
++ p->buffer += size;
++ g->buffer += size;
++ return size;
++}
++
++static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p,
++ GetByteContext *g,
++ unsigned int size)
++{
++ int size2;
++
++ if (p->eof)
++ return 0;
++ size = FFMIN(g->buffer_end - g->buffer, size);
++ size2 = FFMIN(p->buffer_end - p->buffer, size);
++ if (size2 != size)
++ p->eof = 1;
++
++ return bytestream2_copy_bufferu(p, g, size2);
++}
++
+ static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b,
+ uint8_t *dst,
+ unsigned int size)
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264.c 2014-06-28 17:33:25.560190269 +0200
+@@ -128,10 +128,10 @@
+ int ff_h264_check_intra_pred_mode(H264Context *h, int mode, int is_chroma)
+ {
+ MpegEncContext *const s = &h->s;
+- static const int8_t top[7] = { LEFT_DC_PRED8x8, 1, -1, -1 };
+- static const int8_t left[7] = { TOP_DC_PRED8x8, -1, 2, -1, DC_128_PRED8x8 };
++ static const int8_t top[4] = { LEFT_DC_PRED8x8, 1, -1, -1 };
++ static const int8_t left[5] = { TOP_DC_PRED8x8, -1, 2, -1, DC_128_PRED8x8 };
+
+- if (mode > 6U) {
++ if (mode > 3U) {
+ av_log(h->s.avctx, AV_LOG_ERROR,
+ "out of range intra chroma pred mode at %d %d\n",
+ s->mb_x, s->mb_y);
+@@ -1290,6 +1290,8 @@
+ int i;
+ const int pixel_shift = h->pixel_shift;
+
++ h->next_output_pic = NULL;
++
+ if (ff_MPV_frame_start(s, s->avctx) < 0)
+ return -1;
+ ff_er_frame_start(s);
+@@ -1341,8 +1343,6 @@
+ s->current_picture_ptr->field_poc[0] =
+ s->current_picture_ptr->field_poc[1] = INT_MAX;
+
+- h->next_output_pic = NULL;
+-
+ assert(s->current_picture_ptr->long_ref == 0);
+
+ return 0;
+@@ -2427,12 +2427,6 @@
+ if (s->avctx->has_b_frames < 2)
+ s->avctx->has_b_frames = !s->low_delay;
+
+- if (h->sps.bit_depth_luma != h->sps.bit_depth_chroma) {
+- av_log_missing_feature(s->avctx,
+- "Different bit depth between chroma and luma", 1);
+- return AVERROR_PATCHWELCOME;
+- }
+-
+ if (s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma ||
+ h->cur_chroma_format_idc != h->sps.chroma_format_idc) {
+ if (s->avctx->codec &&
+@@ -2916,8 +2910,10 @@
+ Picture *prev = h->short_ref_count ? h->short_ref[0] : NULL;
+ av_log(h->s.avctx, AV_LOG_DEBUG, "Frame num gap %d %d\n",
+ h->frame_num, h->prev_frame_num);
+- if (ff_h264_frame_start(h) < 0)
++ if (ff_h264_frame_start(h) < 0) {
++ s0->first_field = 0;
+ return -1;
++ }
+ h->prev_frame_num++;
+ h->prev_frame_num %= 1 << h->sps.log2_max_frame_num;
+ s->current_picture_ptr->frame_num = h->prev_frame_num;
+@@ -3833,6 +3829,12 @@
+ H264Context *hx;
+ int i;
+
++ if (s->mb_y >= s->mb_height) {
++ av_log(s->avctx, AV_LOG_ERROR,
++ "Input contains more MB rows than the frame height.\n");
++ return AVERROR_INVALIDDATA;
++ }
++
+ if (s->avctx->hwaccel ||
+ s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
+ return 0;
+@@ -3941,7 +3943,7 @@
+ s->workaround_bugs |= FF_BUG_TRUNCATED;
+
+ if (!(s->workaround_bugs & FF_BUG_TRUNCATED))
+- while (ptr[dst_length - 1] == 0 && dst_length > 0)
++ while (dst_length > 0 && ptr[dst_length - 1] == 0)
+ dst_length--;
+ bit_length = !dst_length ? 0
+ : (8 * dst_length -
+@@ -4057,12 +4059,24 @@
+ }
+ break;
+ case NAL_DPA:
++ if (s->flags2 & CODEC_FLAG2_CHUNKS) {
++ av_log(h->s.avctx, AV_LOG_ERROR,
++ "Decoding in chunks is not supported for "
++ "partitioned slices.\n");
++ return AVERROR(ENOSYS);
++ }
++
+ init_get_bits(&hx->s.gb, ptr, bit_length);
+ hx->intra_gb_ptr =
+ hx->inter_gb_ptr = NULL;
+
+- if ((err = decode_slice_header(hx, h)) < 0)
++ if ((err = decode_slice_header(hx, h)) < 0) {
++ /* make sure data_partitioning is cleared if it was set
++ * before, so we don't try decoding a slice without a valid
++ * slice header later */
++ s->data_partitioning = 0;
+ break;
++ }
+
+ hx->s.data_partitioning = 1;
+ break;
+@@ -4130,9 +4144,10 @@
+ context_count = 0;
+ }
+
+- if (err < 0)
++ if (err < 0) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header error\n");
+- else if (err == 1) {
++ h->ref_count[0] = h->ref_count[1] = h->list_count = 0;
++ } else if (err == 1) {
+ /* Slice could not be decoded in parallel mode, copy down
+ * NAL unit stuff to context 0 and restart. Note that
+ * rbsp_buffer is not transferred, but since we no longer
+@@ -4183,6 +4198,9 @@
+
+ s->flags = avctx->flags;
+ s->flags2 = avctx->flags2;
++ /* reset data partitioning here, to ensure GetBitContexts from previous
++ * packets do not get used. */
++ s->data_partitioning = 0;
+
+ /* end of stream, output what is still in the buffers */
+ out:
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264dsp.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264dsp.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264dsp.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264dsp.c 2014-06-28 17:33:25.560190269 +0200
+@@ -54,13 +54,13 @@
+ c->h264_idct8_dc_add= FUNC(ff_h264_idct8_dc_add, depth);\
+ c->h264_idct_add16 = FUNC(ff_h264_idct_add16, depth);\
+ c->h264_idct8_add4 = FUNC(ff_h264_idct8_add4, depth);\
+- if (chroma_format_idc == 1)\
++ if (chroma_format_idc <= 1)\
+ c->h264_idct_add8 = FUNC(ff_h264_idct_add8, depth);\
+ else\
+ c->h264_idct_add8 = FUNC(ff_h264_idct_add8_422, depth);\
+ c->h264_idct_add16intra= FUNC(ff_h264_idct_add16intra, depth);\
+ c->h264_luma_dc_dequant_idct= FUNC(ff_h264_luma_dc_dequant_idct, depth);\
+- if (chroma_format_idc == 1)\
++ if (chroma_format_idc <= 1)\
+ c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma_dc_dequant_idct, depth);\
+ else\
+ c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma422_dc_dequant_idct, depth);\
+@@ -81,20 +81,20 @@
+ c->h264_h_loop_filter_luma_intra= FUNC(h264_h_loop_filter_luma_intra, depth);\
+ c->h264_h_loop_filter_luma_mbaff_intra= FUNC(h264_h_loop_filter_luma_mbaff_intra, depth);\
+ c->h264_v_loop_filter_chroma= FUNC(h264_v_loop_filter_chroma, depth);\
+- if (chroma_format_idc == 1)\
++ if (chroma_format_idc <= 1)\
+ c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma, depth);\
+ else\
+ c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma422, depth);\
+- if (chroma_format_idc == 1)\
++ if (chroma_format_idc <= 1)\
+ c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma_mbaff, depth);\
+ else\
+ c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma422_mbaff, depth);\
+ c->h264_v_loop_filter_chroma_intra= FUNC(h264_v_loop_filter_chroma_intra, depth);\
+- if (chroma_format_idc == 1)\
++ if (chroma_format_idc <= 1)\
+ c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma_intra, depth);\
+ else\
+ c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma422_intra, depth);\
+- if (chroma_format_idc == 1)\
++ if (chroma_format_idc <= 1)\
+ c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma_mbaff_intra, depth);\
+ else\
+ c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma422_mbaff_intra, depth);\
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264pred.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264pred.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264pred.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264pred.c 2014-06-28 17:33:25.560190269 +0200
+@@ -471,7 +471,7 @@
+ h->pred8x8l[TOP_DC_PRED ]= FUNCC(pred8x8l_top_dc , depth);\
+ h->pred8x8l[DC_128_PRED ]= FUNCC(pred8x8l_128_dc , depth);\
+ \
+- if (chroma_format_idc == 1) {\
++ if (chroma_format_idc <= 1) {\
+ h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\
+ h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\
+ } else {\
+@@ -479,7 +479,7 @@
+ h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\
+ }\
+ if (codec_id != AV_CODEC_ID_VP8) {\
+- if (chroma_format_idc == 1) {\
++ if (chroma_format_idc <= 1) {\
+ h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\
+ } else {\
+ h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x16_plane , depth);\
+@@ -487,7 +487,7 @@
+ } else\
+ h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\
+ if(codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8){\
+- if (chroma_format_idc == 1) {\
++ if (chroma_format_idc <= 1) {\
+ h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\
+ h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\
+ h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\
+@@ -513,7 +513,7 @@
+ h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\
+ }\
+ }\
+- if (chroma_format_idc == 1) {\
++ if (chroma_format_idc <= 1) {\
+ h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x8_128_dc , depth);\
+ } else {\
+ h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x16_128_dc , depth);\
+@@ -547,7 +547,7 @@
+ h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\
+ h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\
+ h->pred8x8l_add [ HOR_PRED ]= FUNCC(pred8x8l_horizontal_add , depth);\
+- if (chroma_format_idc == 1) {\
++ if (chroma_format_idc <= 1) {\
+ h->pred8x8_add [VERT_PRED8x8]= FUNCC(pred8x8_vertical_add , depth);\
+ h->pred8x8_add [ HOR_PRED8x8]= FUNCC(pred8x8_horizontal_add , depth);\
+ } else {\
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264_ps.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264_ps.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264_ps.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264_ps.c 2014-06-28 17:33:25.560190269 +0200
+@@ -349,6 +349,11 @@
+ }
+ sps->bit_depth_luma = get_ue_golomb(&s->gb) + 8;
+ sps->bit_depth_chroma = get_ue_golomb(&s->gb) + 8;
++ if (sps->bit_depth_chroma != sps->bit_depth_luma) {
++ av_log_missing_feature(s->avctx,
++ "Different bit depth between chroma and luma", 1);
++ goto fail;
++ }
+ sps->transform_bypass = get_bits1(&s->gb);
+ decode_scaling_matrices(h, sps, NULL, 1, sps->scaling_matrix4, sps->scaling_matrix8);
+ }else{
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264_refs.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264_refs.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/h264_refs.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/h264_refs.c 2014-06-28 17:33:25.560190269 +0200
+@@ -62,20 +62,22 @@
+ return match;
+ }
+
+-static int build_def_list(Picture *def, Picture **in, int len, int is_long, int sel){
++static int build_def_list(Picture *def, int def_len,
++ Picture **in, int len, int is_long, int sel)
++{
+ int i[2]={0};
+ int index=0;
+
+- while(i[0]<len || i[1]<len){
++ while ((i[0] < len || i[1] < len) && index < def_len) {
+ while (i[0] < len && !(in[ i[0] ] && (in[ i[0] ]->f.reference & sel)))
+ i[0]++;
+ while (i[1] < len && !(in[ i[1] ] && (in[ i[1] ]->f.reference & (sel^3))))
+ i[1]++;
+- if(i[0] < len){
++ if (i[0] < len && index < def_len) {
+ in[ i[0] ]->pic_id= is_long ? i[0] : in[ i[0] ]->frame_num;
+ split_field_copy(&def[index++], in[ i[0]++ ], sel , 1);
+ }
+- if(i[1] < len){
++ if (i[1] < len && index < def_len) {
+ in[ i[1] ]->pic_id= is_long ? i[1] : in[ i[1] ]->frame_num;
+ split_field_copy(&def[index++], in[ i[1]++ ], sel^3, 0);
+ }
+@@ -123,9 +125,12 @@
+ len= add_sorted(sorted , h->short_ref, h->short_ref_count, cur_poc, 1^list);
+ len+=add_sorted(sorted+len, h->short_ref, h->short_ref_count, cur_poc, 0^list);
+ assert(len<=32);
+- len= build_def_list(h->default_ref_list[list] , sorted , len, 0, s->picture_structure);
+- len+=build_def_list(h->default_ref_list[list]+len, h->long_ref, 16 , 1, s->picture_structure);
+- assert(len<=32);
++
++ len = build_def_list(h->default_ref_list[list], FF_ARRAY_ELEMS(h->default_ref_list[0]),
++ sorted, len, 0, s->picture_structure);
++ len += build_def_list(h->default_ref_list[list] + len,
++ FF_ARRAY_ELEMS(h->default_ref_list[0]) - len,
++ h->long_ref, 16, 1, s->picture_structure);
+
+ if(len < h->ref_count[list])
+ memset(&h->default_ref_list[list][len], 0, sizeof(Picture)*(h->ref_count[list] - len));
+@@ -138,9 +143,12 @@
+ FFSWAP(Picture, h->default_ref_list[1][0], h->default_ref_list[1][1]);
+ }
+ }else{
+- len = build_def_list(h->default_ref_list[0] , h->short_ref, h->short_ref_count, 0, s->picture_structure);
+- len+= build_def_list(h->default_ref_list[0]+len, h-> long_ref, 16 , 1, s->picture_structure);
+- assert(len <= 32);
++ len = build_def_list(h->default_ref_list[0], FF_ARRAY_ELEMS(h->default_ref_list[0]),
++ h->short_ref, h->short_ref_count, 0, s->picture_structure);
++ len += build_def_list(h->default_ref_list[0] + len,
++ FF_ARRAY_ELEMS(h->default_ref_list[0]) - len,
++ h-> long_ref, 16, 1, s->picture_structure);
++
+ if(len < h->ref_count[0])
+ memset(&h->default_ref_list[0][len], 0, sizeof(Picture)*(h->ref_count[0] - len));
+ }
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/libmp3lame.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/libmp3lame.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/libmp3lame.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/libmp3lame.c 2014-06-28 17:33:25.560190269 +0200
+@@ -190,6 +190,7 @@
+ MPADecodeHeader hdr;
+ int len, ret, ch;
+ int lame_result;
++ uint32_t h;
+
+ if (frame) {
+ switch (avctx->sample_fmt) {
+@@ -245,7 +246,12 @@
+ determine the frame size. */
+ if (s->buffer_index < 4)
+ return 0;
+- if (avpriv_mpegaudio_decode_header(&hdr, AV_RB32(s->buffer))) {
++ h = AV_RB32(s->buffer);
++ if (ff_mpa_check_header(h) < 0) {
++ av_log(avctx, AV_LOG_ERROR, "Invalid mp3 header at start of buffer\n");
++ return AVERROR_BUG;
++ }
++ if (avpriv_mpegaudio_decode_header(&hdr, h)) {
+ av_log(avctx, AV_LOG_ERROR, "free format output not supported\n");
+ return -1;
+ }
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/mpeg12.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/mpeg12.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/mpeg12.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/mpeg12.c 2014-06-28 17:33:25.560190269 +0200
+@@ -80,6 +80,15 @@
+ return sign_extend(val, 5 + shift);
+ }
+
++#define check_scantable_index(ctx, x) \
++ do { \
++ if ((x) > 63) { \
++ av_log(ctx->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", \
++ ctx->mb_x, ctx->mb_y); \
++ return AVERROR_INVALIDDATA; \
++ } \
++ } while (0) \
++
+ static inline int mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n)
+ {
+ int level, dc, diff, i, j, run;
+@@ -111,6 +120,7 @@
+ break;
+ } else if (level != 0) {
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ level = (level * qscale * quant_matrix[j]) >> 4;
+ level = (level - 1) | 1;
+@@ -127,6 +137,7 @@
+ level = SHOW_UBITS(re, &s->gb, 8) ; LAST_SKIP_BITS(re, &s->gb, 8);
+ }
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ if (level < 0) {
+ level = -level;
+@@ -138,10 +149,6 @@
+ level = (level - 1) | 1;
+ }
+ }
+- if (i > 63) {
+- av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
+- return -1;
+- }
+
+ block[j] = level;
+ }
+@@ -261,6 +268,7 @@
+
+ if (level != 0) {
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ level = ((level * 2 + 1) * qscale) >> 1;
+ level = (level - 1) | 1;
+@@ -277,6 +285,7 @@
+ level = SHOW_UBITS(re, &s->gb, 8) ; SKIP_BITS(re, &s->gb, 8);
+ }
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ if (level < 0) {
+ level = -level;
+@@ -342,6 +351,7 @@
+
+ if (level != 0) {
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ level = ((level * 2 + 1) * qscale * quant_matrix[j]) >> 5;
+ level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
+@@ -353,6 +363,7 @@
+ level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
+
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ if (level < 0) {
+ level = ((-level * 2 + 1) * qscale * quant_matrix[j]) >> 5;
+@@ -361,10 +372,6 @@
+ level = ((level * 2 + 1) * qscale * quant_matrix[j]) >> 5;
+ }
+ }
+- if (i > 63) {
+- av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
+- return -1;
+- }
+
+ mismatch ^= level;
+ block[j] = level;
+@@ -411,6 +418,7 @@
+
+ if (level != 0) {
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ level = ((level * 2 + 1) * qscale) >> 1;
+ level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
+@@ -422,6 +430,7 @@
+ level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
+
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ if (level < 0) {
+ level = ((-level * 2 + 1) * qscale) >> 1;
+@@ -488,6 +497,7 @@
+ break;
+ } else if (level != 0) {
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ level = (level * qscale * quant_matrix[j]) >> 4;
+ level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
+@@ -498,6 +508,7 @@
+ UPDATE_CACHE(re, &s->gb);
+ level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
+ i += run;
++ check_scantable_index(s, i);
+ j = scantable[i];
+ if (level < 0) {
+ level = (-level * qscale * quant_matrix[j]) >> 4;
+@@ -506,10 +517,6 @@
+ level = (level * qscale * quant_matrix[j]) >> 4;
+ }
+ }
+- if (i > 63) {
+- av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n", s->mb_x, s->mb_y);
+- return -1;
+- }
+
+ mismatch ^= level;
+ block[j] = level;
+@@ -524,10 +531,10 @@
+
+ static inline int mpeg2_fast_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n)
+ {
+- int level, dc, diff, j, run;
++ int level, dc, diff, i, j, run;
+ int component;
+ RLTable *rl;
+- uint8_t * scantable = s->intra_scantable.permutated;
++ uint8_t * const scantable = s->intra_scantable.permutated;
+ const uint16_t *quant_matrix;
+ const int qscale = s->qscale;
+
+@@ -546,6 +553,7 @@
+ dc += diff;
+ s->last_dc[component] = dc;
+ block[0] = dc << (3 - s->intra_dc_precision);
++ i = 0;
+ if (s->intra_vlc_format)
+ rl = &ff_rl_mpeg2;
+ else
+@@ -561,8 +569,9 @@
+ if (level == 127) {
+ break;
+ } else if (level != 0) {
+- scantable += run;
+- j = *scantable;
++ i += run;
++ check_scantable_index(s, i);
++ j = scantable[i];
+ level = (level * qscale * quant_matrix[j]) >> 4;
+ level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
+ LAST_SKIP_BITS(re, &s->gb, 1);
+@@ -571,8 +580,9 @@
+ run = SHOW_UBITS(re, &s->gb, 6) + 1; LAST_SKIP_BITS(re, &s->gb, 6);
+ UPDATE_CACHE(re, &s->gb);
+ level = SHOW_SBITS(re, &s->gb, 12); SKIP_BITS(re, &s->gb, 12);
+- scantable += run;
+- j = *scantable;
++ i += run;
++ check_scantable_index(s, i);
++ j = scantable[i];
+ if (level < 0) {
+ level = (-level * qscale * quant_matrix[j]) >> 4;
+ level = -level;
+@@ -586,7 +596,7 @@
+ CLOSE_READER(re, &s->gb);
+ }
+
+- s->block_last_index[n] = scantable - s->intra_scantable.permutated;
++ s->block_last_index[n] = i;
+ return 0;
+ }
+
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/mpegaudiodecheader.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/mpegaudiodecheader.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/mpegaudiodecheader.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/mpegaudiodecheader.c 2014-06-28 17:33:25.563523588 +0200
+@@ -25,6 +25,8 @@
+ */
+
+ //#define DEBUG
++#include "libavutil/common.h"
++
+ #include "avcodec.h"
+ #include "mpegaudio.h"
+ #include "mpegaudiodata.h"
+@@ -46,6 +48,8 @@
+ s->layer = 4 - ((header >> 17) & 3);
+ /* extract frequency */
+ sample_rate_index = (header >> 10) & 3;
++ if (sample_rate_index >= FF_ARRAY_ELEMS(avpriv_mpa_freq_tab))
++ sample_rate_index = 0;
+ sample_rate = avpriv_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25);
+ sample_rate_index += 3 * (s->lsf + mpeg25);
+ s->sample_rate_index = sample_rate_index;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/mpegvideo.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/mpegvideo.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/mpegvideo.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/mpegvideo.c 2014-06-28 17:33:25.563523588 +0200
+@@ -1481,6 +1481,10 @@
+ return i;
+ }
+ s->last_picture_ptr = &s->picture[i];
++
++ s->last_picture_ptr->f.reference = 3;
++ s->last_picture_ptr->f.pict_type = AV_PICTURE_TYPE_I;
++
+ if (ff_alloc_picture(s, s->last_picture_ptr, 0) < 0) {
+ s->last_picture_ptr = NULL;
+ return -1;
+@@ -1499,6 +1503,10 @@
+ return i;
+ }
+ s->next_picture_ptr = &s->picture[i];
++
++ s->next_picture_ptr->f.reference = 3;
++ s->next_picture_ptr->f.pict_type = AV_PICTURE_TYPE_I;
++
+ if (ff_alloc_picture(s, s->next_picture_ptr, 0) < 0) {
+ s->next_picture_ptr = NULL;
+ return -1;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/ppc/h264_altivec.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/ppc/h264_altivec.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/ppc/h264_altivec.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/ppc/h264_altivec.c 2014-06-28 17:33:25.563523588 +0200
+@@ -1005,7 +1005,7 @@
+ if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
+ if (bit_depth == 8) {
+ c->h264_idct_add = ff_h264_idct_add_altivec;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_altivec;
+ c->h264_idct_add16 = ff_h264_idct_add16_altivec;
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_altivec;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/sgidec.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/sgidec.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/sgidec.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/sgidec.c 2014-06-28 17:33:25.563523588 +0200
+@@ -26,6 +26,7 @@
+ #include "sgi.h"
+
+ typedef struct SgiState {
++ AVCodecContext *avctx;
+ AVFrame picture;
+ unsigned int width;
+ unsigned int height;
+@@ -39,12 +40,12 @@
+ * Expand an RLE row into a channel.
+ * @param s the current image state
+ * @param out_buf Points to one line after the output buffer.
+- * @param out_end end of line in output buffer
++ * @param len length of out_buf in bytes
+ * @param pixelstride pixel stride of input buffer
+ * @return size of output in bytes, -1 if buffer overflows
+ */
+ static int expand_rle_row(SgiState *s, uint8_t *out_buf,
+- uint8_t *out_end, int pixelstride)
++ int len, int pixelstride)
+ {
+ unsigned char pixel, count;
+ unsigned char *orig = out_buf;
+@@ -58,7 +59,10 @@
+ }
+
+ /* Check for buffer overflow. */
+- if(out_buf + pixelstride * count >= out_end) return -1;
++ if (pixelstride * (count - 1) >= len) {
++ av_log(s->avctx, AV_LOG_ERROR, "Invalid pixel count.\n");
++ return AVERROR_INVALIDDATA;
++ }
+
+ if (pixel & 0x80) {
+ while (count--) {
+@@ -101,7 +105,7 @@
+ dest_row -= s->linesize;
+ start_offset = bytestream2_get_be32(&g_table);
+ bytestream2_seek(&s->g, start_offset, SEEK_SET);
+- if (expand_rle_row(s, dest_row + z, dest_row + FFABS(s->linesize),
++ if (expand_rle_row(s, dest_row + z, FFABS(s->linesize) - z,
+ s->depth) != s->width) {
+ return AVERROR_INVALIDDATA;
+ }
+@@ -243,6 +247,8 @@
+ static av_cold int sgi_init(AVCodecContext *avctx){
+ SgiState *s = avctx->priv_data;
+
++ s->avctx = avctx;
++
+ avcodec_get_frame_defaults(&s->picture);
+ avctx->coded_frame = &s->picture;
+
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/tiff.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/tiff.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/tiff.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/tiff.c 2014-06-28 17:33:25.563523588 +0200
+@@ -26,6 +26,7 @@
+ */
+
+ #include "avcodec.h"
++#include "bytestream.h"
+ #include "config.h"
+ #if CONFIG_ZLIB
+ #include <zlib.h>
+@@ -42,6 +43,7 @@
+ typedef struct TiffContext {
+ AVCodecContext *avctx;
+ AVFrame picture;
++ GetByteContext gb;
+
+ int width, height;
+ unsigned int bpp, bppcount;
+@@ -56,33 +58,27 @@
+
+ int strips, rps, sstype;
+ int sot;
+- const uint8_t *stripdata;
+- const uint8_t *stripsizes;
+- int stripsize, stripoff;
++ int stripsizesoff, stripsize, stripoff, strippos;
+ LZWState *lzw;
+ } TiffContext;
+
+-static unsigned tget_short(const uint8_t **p, int le)
++static unsigned tget_short(GetByteContext *gb, int le)
+ {
+- unsigned v = le ? AV_RL16(*p) : AV_RB16(*p);
+- *p += 2;
+- return v;
++ return le ? bytestream2_get_le16(gb) : bytestream2_get_be16(gb);
+ }
+
+-static unsigned tget_long(const uint8_t **p, int le)
++static unsigned tget_long(GetByteContext *gb, int le)
+ {
+- unsigned v = le ? AV_RL32(*p) : AV_RB32(*p);
+- *p += 4;
+- return v;
++ return le ? bytestream2_get_le32(gb) : bytestream2_get_be32(gb);
+ }
+
+-static unsigned tget(const uint8_t **p, int type, int le)
++static unsigned tget(GetByteContext *gb, int type, int le)
+ {
+ switch (type) {
+- case TIFF_BYTE : return *(*p)++;
+- case TIFF_SHORT: return tget_short(p, le);
+- case TIFF_LONG : return tget_long(p, le);
+- default : return UINT_MAX;
++ case TIFF_BYTE: return bytestream2_get_byte(gb);
++ case TIFF_SHORT: return tget_short(gb, le);
++ case TIFF_LONG: return tget_long(gb, le);
++ default: return UINT_MAX;
+ }
+ }
+
+@@ -112,8 +108,8 @@
+ static int tiff_unpack_strip(TiffContext *s, uint8_t *dst, int stride,
+ const uint8_t *src, int size, int lines)
+ {
++ PutByteContext pb;
+ int c, line, pixels, code;
+- const uint8_t *ssrc = src;
+ int width = ((s->width * s->bpp) + 7) >> 3;
+
+ if (size <= 0)
+@@ -151,6 +147,16 @@
+ av_log(s->avctx, AV_LOG_ERROR, "Error initializing LZW decoder\n");
+ return -1;
+ }
++ for (line = 0; line < lines; line++) {
++ pixels = ff_lzw_decode(s->lzw, dst, width);
++ if (pixels < width) {
++ av_log(s->avctx, AV_LOG_ERROR, "Decoded only %i bytes of %i\n",
++ pixels, width);
++ return AVERROR_INVALIDDATA;
++ }
++ dst += stride;
++ }
++ return 0;
+ }
+ if (s->compr == TIFF_CCITT_RLE || s->compr == TIFF_G3
+ || s->compr == TIFF_G4) {
+@@ -187,63 +193,40 @@
+ av_free(src2);
+ return ret;
+ }
++
++ bytestream2_init(&s->gb, src, size);
++ bytestream2_init_writer(&pb, dst, stride * lines);
++
+ for (line = 0; line < lines; line++) {
+- if (src - ssrc > size) {
+- av_log(s->avctx, AV_LOG_ERROR, "Source data overread\n");
+- return -1;
+- }
++ if (bytestream2_get_bytes_left(&s->gb) == 0 || bytestream2_get_eof(&pb))
++ break;
++ bytestream2_seek_p(&pb, stride * line, SEEK_SET);
+ switch (s->compr) {
+ case TIFF_RAW:
+- if (ssrc + size - src < width)
+- return AVERROR_INVALIDDATA;
+ if (!s->fill_order) {
+- memcpy(dst, src, width);
++ bytestream2_copy_buffer(&pb, &s->gb, width);
+ } else {
+ int i;
+ for (i = 0; i < width; i++)
+- dst[i] = ff_reverse[src[i]];
++ bytestream2_put_byte(&pb, ff_reverse[bytestream2_get_byte(&s->gb)]);
+ }
+- src += width;
+ break;
+ case TIFF_PACKBITS:
+ for (pixels = 0; pixels < width;) {
+- if (ssrc + size - src < 2)
+- return AVERROR_INVALIDDATA;
+- code = (int8_t) * src++;
++ code = (int8_t)bytestream2_get_byte(&s->gb);
+ if (code >= 0) {
+ code++;
+- if (pixels + code > width ||
+- ssrc + size - src < code) {
+- av_log(s->avctx, AV_LOG_ERROR,
+- "Copy went out of bounds\n");
+- return -1;
+- }
+- memcpy(dst + pixels, src, code);
+- src += code;
++ bytestream2_copy_buffer(&pb, &s->gb, code);
+ pixels += code;
+ } else if (code != -128) { // -127..-1
+ code = (-code) + 1;
+- if (pixels + code > width) {
+- av_log(s->avctx, AV_LOG_ERROR,
+- "Run went out of bounds\n");
+- return -1;
+- }
+- c = *src++;
+- memset(dst + pixels, c, code);
++ c = bytestream2_get_byte(&s->gb);
++ bytestream2_set_buffer(&pb, c, code);
+ pixels += code;
+ }
+ }
+ break;
+- case TIFF_LZW:
+- pixels = ff_lzw_decode(s->lzw, dst, width);
+- if (pixels < width) {
+- av_log(s->avctx, AV_LOG_ERROR, "Decoded only %i bytes of %i\n",
+- pixels, width);
+- return -1;
+- }
+- break;
+ }
+- dst += stride;
+ }
+ return 0;
+ }
+@@ -302,20 +285,19 @@
+ return 0;
+ }
+
+-static int tiff_decode_tag(TiffContext *s, const uint8_t *start,
+- const uint8_t *buf, const uint8_t *end_buf)
++static int tiff_decode_tag(TiffContext *s)
+ {
+ unsigned tag, type, count, off, value = 0;
+- int i, j;
++ int i, start;
+ uint32_t *pal;
+- const uint8_t *rp, *gp, *bp;
+
+- if (end_buf - buf < 12)
++ if (bytestream2_get_bytes_left(&s->gb) < 12)
+ return -1;
+- tag = tget_short(&buf, s->le);
+- type = tget_short(&buf, s->le);
+- count = tget_long(&buf, s->le);
+- off = tget_long(&buf, s->le);
++ tag = tget_short(&s->gb, s->le);
++ type = tget_short(&s->gb, s->le);
++ count = tget_long(&s->gb, s->le);
++ off = tget_long(&s->gb, s->le);
++ start = bytestream2_tell(&s->gb);
+
+ if (type == 0 || type >= FF_ARRAY_ELEMS(type_sizes)) {
+ av_log(s->avctx, AV_LOG_DEBUG, "Unknown tiff type (%u) encountered\n",
+@@ -327,35 +309,26 @@
+ switch (type) {
+ case TIFF_BYTE:
+ case TIFF_SHORT:
+- buf -= 4;
+- value = tget(&buf, type, s->le);
+- buf = NULL;
++ bytestream2_seek(&s->gb, -4, SEEK_CUR);
++ value = tget(&s->gb, type, s->le);
+ break;
+ case TIFF_LONG:
+ value = off;
+- buf = NULL;
+ break;
+ case TIFF_STRING:
+ if (count <= 4) {
+- buf -= 4;
++ bytestream2_seek(&s->gb, -4, SEEK_CUR);
+ break;
+ }
+ default:
+ value = UINT_MAX;
+- buf = start + off;
++ bytestream2_seek(&s->gb, off, SEEK_SET);
+ }
+ } else {
+- if (count <= 4 && type_sizes[type] * count <= 4) {
+- buf -= 4;
+- } else {
+- buf = start + off;
+- }
+- }
+-
+- if (buf && (buf < start || buf > end_buf)) {
+- av_log(s->avctx, AV_LOG_ERROR,
+- "Tag referencing position outside the image\n");
+- return -1;
++ if (count <= 4 && type_sizes[type] * count <= 4)
++ bytestream2_seek(&s->gb, -4, SEEK_CUR);
++ else
++ bytestream2_seek(&s->gb, off, SEEK_SET);
+ }
+
+ switch (tag) {
+@@ -384,8 +357,8 @@
+ case TIFF_SHORT:
+ case TIFF_LONG:
+ s->bpp = 0;
+- for (i = 0; i < count && buf < end_buf; i++)
+- s->bpp += tget(&buf, type, s->le);
++ for (i = 0; i < count; i++)
++ s->bpp += tget(&s->gb, type, s->le);
+ break;
+ default:
+ s->bpp = -1;
+@@ -446,35 +419,25 @@
+ break;
+ case TIFF_STRIP_OFFS:
+ if (count == 1) {
+- s->stripdata = NULL;
++ s->strippos = 0;
+ s->stripoff = value;
+ } else
+- s->stripdata = start + off;
++ s->strippos = off;
+ s->strips = count;
+ if (s->strips == 1)
+ s->rps = s->height;
+ s->sot = type;
+- if (s->stripdata > end_buf) {
+- av_log(s->avctx, AV_LOG_ERROR,
+- "Tag referencing position outside the image\n");
+- return -1;
+- }
+ break;
+ case TIFF_STRIP_SIZE:
+ if (count == 1) {
+- s->stripsizes = NULL;
+- s->stripsize = value;
+- s->strips = 1;
++ s->stripsizesoff = 0;
++ s->stripsize = value;
++ s->strips = 1;
+ } else {
+- s->stripsizes = start + off;
++ s->stripsizesoff = off;
+ }
+ s->strips = count;
+ s->sstype = type;
+- if (s->stripsizes > end_buf) {
+- av_log(s->avctx, AV_LOG_ERROR,
+- "Tag referencing position outside the image\n");
+- return -1;
+- }
+ break;
+ case TIFF_PREDICTOR:
+ s->predictor = value;
+@@ -504,23 +467,27 @@
+ }
+ s->fill_order = value - 1;
+ break;
+- case TIFF_PAL:
++ case TIFF_PAL: {
++ GetByteContext pal_gb[3];
+ pal = (uint32_t *) s->palette;
+ off = type_sizes[type];
+- if (count / 3 > 256 || end_buf - buf < count / 3 * off * 3)
++ if (count / 3 > 256 ||
++ bytestream2_get_bytes_left(&s->gb) < count / 3 * off * 3)
+ return -1;
+- rp = buf;
+- gp = buf + count / 3 * off;
+- bp = buf + count / 3 * off * 2;
++ pal_gb[0] = pal_gb[1] = pal_gb[2] = s->gb;
++ bytestream2_skip(&pal_gb[1], count / 3 * off);
++ bytestream2_skip(&pal_gb[2], count / 3 * off * 2);
+ off = (type_sizes[type] - 1) << 3;
+ for (i = 0; i < count / 3; i++) {
+- j = (tget(&rp, type, s->le) >> off) << 16;
+- j |= (tget(&gp, type, s->le) >> off) << 8;
+- j |= tget(&bp, type, s->le) >> off;
+- pal[i] = j;
++ uint32_t p = 0xFF000000;
++ p |= (tget(&pal_gb[0], type, s->le) >> off) << 16;
++ p |= (tget(&pal_gb[1], type, s->le) >> off) << 8;
++ p |= tget(&pal_gb[2], type, s->le) >> off;
++ pal[i] = p;
+ }
+ s->palette_is_set = 1;
+ break;
++ }
+ case TIFF_PLANAR:
+ if (value == 2) {
+ av_log(s->avctx, AV_LOG_ERROR, "Planar format is not supported\n");
+@@ -539,30 +506,31 @@
+ av_log(s->avctx, AV_LOG_DEBUG, "Unknown or unsupported tag %d/0X%0X\n",
+ tag, tag);
+ }
++ bytestream2_seek(&s->gb, start, SEEK_SET);
+ return 0;
+ }
+
+ static int decode_frame(AVCodecContext *avctx,
+ void *data, int *got_frame, AVPacket *avpkt)
+ {
+- const uint8_t *buf = avpkt->data;
+- int buf_size = avpkt->size;
+ TiffContext *const s = avctx->priv_data;
+ AVFrame *picture = data;
+ AVFrame *const p = &s->picture;
+- const uint8_t *orig_buf = buf, *end_buf = buf + buf_size;
+ unsigned off;
+ int id, le, ret;
+ int i, j, entries;
+ int stride;
+ unsigned soff, ssize;
+ uint8_t *dst;
++ GetByteContext stripsizes;
++ GetByteContext stripdata;
++
++ bytestream2_init(&s->gb, avpkt->data, avpkt->size);
+
+ //parse image header
+- if (end_buf - buf < 8)
++ if (avpkt->size < 8)
+ return AVERROR_INVALIDDATA;
+- id = AV_RL16(buf);
+- buf += 2;
++ id = bytestream2_get_le16(&s->gb);
+ if (id == 0x4949)
+ le = 1;
+ else if (id == 0x4D4D)
+@@ -577,27 +545,26 @@
+ s->fill_order = 0;
+ // As TIFF 6.0 specification puts it "An arbitrary but carefully chosen number
+ // that further identifies the file as a TIFF file"
+- if (tget_short(&buf, le) != 42) {
++ if (tget_short(&s->gb, le) != 42) {
+ av_log(avctx, AV_LOG_ERROR,
+ "The answer to life, universe and everything is not correct!\n");
+ return -1;
+ }
+- // Reset these pointers so we can tell if they were set this frame
+- s->stripsizes = s->stripdata = NULL;
++ // Reset these offsets so we can tell if they were set this frame
++ s->stripsizesoff = s->strippos = 0;
+ /* parse image file directory */
+- off = tget_long(&buf, le);
+- if (off >= UINT_MAX - 14 || end_buf - orig_buf < off + 14) {
++ off = tget_long(&s->gb, le);
++ if (off >= UINT_MAX - 14 || avpkt->size < off + 14) {
+ av_log(avctx, AV_LOG_ERROR, "IFD offset is greater than image size\n");
+ return AVERROR_INVALIDDATA;
+ }
+- buf = orig_buf + off;
+- entries = tget_short(&buf, le);
++ bytestream2_seek(&s->gb, off, SEEK_SET);
++ entries = tget_short(&s->gb, le);
+ for (i = 0; i < entries; i++) {
+- if (tiff_decode_tag(s, orig_buf, buf, end_buf) < 0)
++ if (tiff_decode_tag(s) < 0)
+ return -1;
+- buf += 12;
+ }
+- if (!s->stripdata && !s->stripoff) {
++ if (!s->strippos && !s->stripoff) {
+ av_log(avctx, AV_LOG_ERROR, "Image data is missing\n");
+ return -1;
+ }
+@@ -607,30 +574,40 @@
+
+ if (s->strips == 1 && !s->stripsize) {
+ av_log(avctx, AV_LOG_WARNING, "Image data size missing\n");
+- s->stripsize = buf_size - s->stripoff;
++ s->stripsize = avpkt->size - s->stripoff;
+ }
+ stride = p->linesize[0];
+ dst = p->data[0];
++
++ if (s->stripsizesoff) {
++ if (s->stripsizesoff >= avpkt->size)
++ return AVERROR_INVALIDDATA;
++ bytestream2_init(&stripsizes, avpkt->data + s->stripsizesoff,
++ avpkt->size - s->stripsizesoff);
++ }
++ if (s->strippos) {
++ if (s->strippos >= avpkt->size)
++ return AVERROR_INVALIDDATA;
++ bytestream2_init(&stripdata, avpkt->data + s->strippos,
++ avpkt->size - s->strippos);
++ }
++
+ for (i = 0; i < s->height; i += s->rps) {
+- if (s->stripsizes) {
+- if (s->stripsizes >= end_buf)
+- return AVERROR_INVALIDDATA;
+- ssize = tget(&s->stripsizes, s->sstype, s->le);
+- } else
++ if (s->stripsizesoff)
++ ssize = tget(&stripsizes, s->sstype, le);
++ else
+ ssize = s->stripsize;
+
+- if (s->stripdata) {
+- if (s->stripdata >= end_buf)
+- return AVERROR_INVALIDDATA;
+- soff = tget(&s->stripdata, s->sot, s->le);
+- } else
++ if (s->strippos)
++ soff = tget(&stripdata, s->sot, le);
++ else
+ soff = s->stripoff;
+
+- if (soff > buf_size || ssize > buf_size - soff) {
++ if (soff > avpkt->size || ssize > avpkt->size - soff) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid strip size/offset\n");
+ return -1;
+ }
+- if (tiff_unpack_strip(s, dst, stride, orig_buf + soff, ssize,
++ if (tiff_unpack_strip(s, dst, stride, avpkt->data + soff, ssize,
+ FFMIN(s->rps, s->height - i)) < 0)
+ break;
+ dst += s->rps * stride;
+@@ -660,7 +637,7 @@
+ *picture = s->picture;
+ *got_frame = 1;
+
+- return buf_size;
++ return avpkt->size;
+ }
+
+ static av_cold int tiff_init(AVCodecContext *avctx)
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/x86/h264dsp_init.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/x86/h264dsp_init.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/x86/h264dsp_init.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/x86/h264dsp_init.c 2014-06-28 17:33:25.563523588 +0200
+@@ -212,7 +212,7 @@
+ {
+ int mm_flags = av_get_cpu_flags();
+
+- if (chroma_format_idc == 1 && EXTERNAL_MMXEXT(mm_flags))
++ if (chroma_format_idc <= 1 && EXTERNAL_MMXEXT(mm_flags))
+ c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext;
+
+ if (bit_depth == 8) {
+@@ -224,7 +224,7 @@
+
+ c->h264_idct_add16 = ff_h264_idct_add16_8_mmx;
+ c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmx;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_8_mmx;
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmx;
+ if (mm_flags & AV_CPU_FLAG_CMOV)
+@@ -235,13 +235,13 @@
+ c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext;
+ c->h264_idct_add16 = ff_h264_idct_add16_8_mmxext;
+ c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmxext;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_8_mmxext;
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmxext;
+
+ c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_mmxext;
+ c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmxext;
+- if (chroma_format_idc == 1) {
++ if (chroma_format_idc <= 1) {
+ c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_mmxext;
+ c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_mmxext;
+ }
+@@ -264,7 +264,7 @@
+
+ c->h264_idct_add16 = ff_h264_idct_add16_8_sse2;
+ c->h264_idct8_add4 = ff_h264_idct8_add4_8_sse2;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_8_sse2;
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_8_sse2;
+ c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_sse2;
+@@ -309,7 +309,7 @@
+ c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2;
+
+ c->h264_idct_add16 = ff_h264_idct_add16_10_sse2;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_10_sse2;
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_10_sse2;
+ #if HAVE_ALIGNED_STACK
+@@ -349,7 +349,7 @@
+ c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx;
+
+ c->h264_idct_add16 = ff_h264_idct_add16_10_avx;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ c->h264_idct_add8 = ff_h264_idct_add8_10_avx;
+ c->h264_idct_add16intra = ff_h264_idct_add16intra_10_avx;
+ #if HAVE_ALIGNED_STACK
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/x86/h264_intrapred_init.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/x86/h264_intrapred_init.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavcodec/x86/h264_intrapred_init.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavcodec/x86/h264_intrapred_init.c 2014-06-28 17:33:25.563523588 +0200
+@@ -187,7 +187,7 @@
+ if (EXTERNAL_MMX(mm_flags)) {
+ h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx;
+ h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx;
+- if (chroma_format_idc == 1) {
++ if (chroma_format_idc <= 1) {
+ h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_8_mmx;
+ h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmx;
+ }
+@@ -196,7 +196,7 @@
+ h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_mmx;
+ h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmx;
+ } else {
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx;
+ if (codec_id == AV_CODEC_ID_SVQ3) {
+ if (mm_flags & AV_CPU_FLAG_CMOV)
+@@ -212,7 +212,7 @@
+ if (EXTERNAL_MMXEXT(mm_flags)) {
+ h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext;
+ h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmxext;
+ h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmxext;
+ h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_mmxext;
+@@ -237,7 +237,7 @@
+ h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_8_mmxext;
+ }
+ if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
+- if (chroma_format_idc == 1) {
++ if (chroma_format_idc <= 1) {
+ h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_8_mmxext;
+ h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_8_mmxext;
+ }
+@@ -249,7 +249,7 @@
+ h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmxext;
+ h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_8_mmxext;
+ } else {
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmxext;
+ if (codec_id == AV_CODEC_ID_SVQ3) {
+ h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_8_mmxext;
+@@ -276,7 +276,7 @@
+ h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_sse2;
+ h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_sse2;
+ } else {
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_sse2;
+ if (codec_id == AV_CODEC_ID_SVQ3) {
+ h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_sse2;
+@@ -291,7 +291,7 @@
+ if (EXTERNAL_SSSE3(mm_flags)) {
+ h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_ssse3;
+ h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_ssse3;
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_ssse3;
+ h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_ssse3;
+ h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_ssse3;
+@@ -307,7 +307,7 @@
+ h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_ssse3;
+ h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_ssse3;
+ } else {
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_ssse3;
+ if (codec_id == AV_CODEC_ID_SVQ3) {
+ h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_ssse3;
+@@ -323,7 +323,7 @@
+ h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext;
+ h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext;
+
+- if (chroma_format_idc == 1)
++ if (chroma_format_idc <= 1)
+ h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext;
+
+ h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext;
+@@ -342,7 +342,7 @@
+ h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_sse2;
+ h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_sse2;
+
+- if (chroma_format_idc == 1) {
++ if (chroma_format_idc <= 1) {
+ h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_sse2;
+ h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_10_sse2;
+ h->pred8x8[PLANE_PRED8x8 ] = ff_pred8x8_plane_10_sse2;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/af_channelmap.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/af_channelmap.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/af_channelmap.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/af_channelmap.c 2014-06-28 17:33:25.563523588 +0200
+@@ -197,7 +197,7 @@
+ s->map[i].out_channel_idx = i;
+ break;
+ case MAP_ONE_STR:
+- if (!get_channel(&mapping, &in_ch, ',')) {
++ if (get_channel(&mapping, &in_ch, ',') < 0) {
+ av_log(ctx, AV_LOG_ERROR, err);
+ ret = AVERROR(EINVAL);
+ goto fail;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/af_volume.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/af_volume.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/af_volume.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/af_volume.c 2014-06-28 17:33:25.563523588 +0200
+@@ -282,6 +282,8 @@
+ }
+ }
+
++ emms_c();
++
+ if (buf != out_buf)
+ avfilter_unref_buffer(buf);
+
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/vf_gradfun.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/vf_gradfun.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/vf_gradfun.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/vf_gradfun.c 2014-06-28 17:33:25.563523588 +0200
+@@ -117,6 +117,7 @@
+ ctx->filter_line(dst + y * dst_linesize, src + y * src_linesize, dc - r / 2, width, thresh, dither[y & 7]);
+ if (++y >= height) break;
+ }
++ emms_c();
+ }
+
+ static av_cold int init(AVFilterContext *ctx, const char *args)
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/vf_hqdn3d.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/vf_hqdn3d.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavfilter/vf_hqdn3d.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavfilter/vf_hqdn3d.c 2014-06-28 17:33:25.563523588 +0200
+@@ -155,6 +155,7 @@
+ else
+ denoise_temporal(src, dst, frame_ant,
+ w, h, sstride, dstride, temporal, depth);
++ emms_c();
+ }
+
+ #define denoise(...) \
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/avidec.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/avidec.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/avidec.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/avidec.c 2014-06-28 17:33:25.563523588 +0200
+@@ -732,7 +732,11 @@
+ if(!avi->index_loaded && pb->seekable)
+ avi_load_index(s);
+ avi->index_loaded = 1;
+- avi->non_interleaved |= guess_ni_flag(s);
++
++ if ((ret = guess_ni_flag(s)) < 0)
++ return ret;
++
++ avi->non_interleaved |= ret;
+ for(i=0; i<s->nb_streams; i++){
+ AVStream *st = s->streams[i];
+ if(st->nb_index_entries)
+@@ -1204,6 +1208,64 @@
+ return 0;
+ }
+
++/* Scan the index and consider any file with streams more than
++ * 2 seconds or 64MB apart non-interleaved. */
++static int check_stream_max_drift(AVFormatContext *s)
++{
++ int64_t min_pos, pos;
++ int i;
++ int *idx = av_mallocz_array(s->nb_streams, sizeof(*idx));
++ if (!idx)
++ return AVERROR(ENOMEM);
++
++ for (min_pos = pos = 0; min_pos != INT64_MAX; pos = min_pos + 1LU) {
++ int64_t max_dts = INT64_MIN / 2;
++ int64_t min_dts = INT64_MAX / 2;
++ int64_t max_buffer = 0;
++
++ min_pos = INT64_MAX;
++
++ for (i = 0; i < s->nb_streams; i++) {
++ AVStream *st = s->streams[i];
++ AVIStream *ast = st->priv_data;
++ int n = st->nb_index_entries;
++ while (idx[i] < n && st->index_entries[idx[i]].pos < pos)
++ idx[i]++;
++ if (idx[i] < n) {
++ int64_t dts;
++ dts = av_rescale_q(st->index_entries[idx[i]].timestamp /
++ FFMAX(ast->sample_size, 1),
++ st->time_base, AV_TIME_BASE_Q);
++ min_dts = FFMIN(min_dts, dts);
++ min_pos = FFMIN(min_pos, st->index_entries[idx[i]].pos);
++ }
++ }
++ for (i = 0; i < s->nb_streams; i++) {
++ AVStream *st = s->streams[i];
++ AVIStream *ast = st->priv_data;
++
++ if (idx[i] && min_dts != INT64_MAX / 2) {
++ int64_t dts;
++ dts = av_rescale_q(st->index_entries[idx[i] - 1].timestamp /
++ FFMAX(ast->sample_size, 1),
++ st->time_base, AV_TIME_BASE_Q);
++ max_dts = FFMAX(max_dts, dts);
++ max_buffer = FFMAX(max_buffer,
++ av_rescale(dts - min_dts,
++ st->codec->bit_rate,
++ AV_TIME_BASE));
++ }
++ }
++ if (max_dts - min_dts > 2 * AV_TIME_BASE ||
++ max_buffer > 1024 * 1024 * 8 * 8) {
++ av_free(idx);
++ return 1;
++ }
++ }
++ av_free(idx);
++ return 0;
++}
++
+ static int guess_ni_flag(AVFormatContext *s){
+ int i;
+ int64_t last_start=0;
+@@ -1232,7 +1294,11 @@
+ first_end= st->index_entries[n-1].pos;
+ }
+ avio_seek(s->pb, oldpos, SEEK_SET);
+- return last_start > first_end;
++
++ if (last_start > first_end)
++ return 1;
++
++ return check_stream_max_drift(s);
+ }
+
+ static int avi_load_index(AVFormatContext *s)
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/isom.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/isom.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/isom.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/isom.c 2014-06-28 17:33:25.563523588 +0200
+@@ -259,6 +259,7 @@
+ { AV_CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') },
+ { AV_CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') },
++ { AV_CODEC_ID_PCM_S16BE, MKTAG('l', 'p', 'c', 'm') },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') },
+ { AV_CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') },
+ { AV_CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') },
+@@ -342,7 +343,7 @@
+ memset(to, 0, 4);
+ /* is it the mangled iso code? */
+ /* see http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt */
+- if (code > 138) {
++ if (code >= 0x400 && code != 0x7fff) {
+ for (i = 2; i >= 0; i--) {
+ to[i] = 0x60 + (code & 0x1f);
+ code >>= 5;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/Makefile gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/Makefile
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/Makefile 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/Makefile 2014-06-28 17:33:25.563523588 +0200
+@@ -203,6 +203,7 @@
+ oggparsedirac.o \
+ oggparseflac.o \
+ oggparseogm.o \
++ oggparseopus.o \
+ oggparseskeleton.o \
+ oggparsespeex.o \
+ oggparsetheora.o \
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/matroska.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/matroska.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/matroska.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/matroska.c 2014-06-28 17:33:25.563523588 +0200
+@@ -32,6 +32,7 @@
+ {"A_MPEG/L2" , AV_CODEC_ID_MP2},
+ {"A_MPEG/L1" , AV_CODEC_ID_MP2},
+ {"A_MPEG/L3" , AV_CODEC_ID_MP3},
++ {"A_OPUS" , AV_CODEC_ID_OPUS},
+ {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F32LE},
+ {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F64LE},
+ {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S16BE},
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/matroskaenc.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/matroskaenc.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/matroskaenc.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/matroskaenc.c 2014-06-28 17:33:25.563523588 +0200
+@@ -94,6 +94,8 @@
+ AVPacket cur_audio_pkt;
+
+ int have_attachments;
++
++ int64_t ts_offset;
+ } MatroskaMuxContext;
+
+
+@@ -776,7 +778,8 @@
+ end_ebml_master(s->pb, targets);
+
+ while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
+- if (av_strcasecmp(t->key, "title"))
++ if (av_strcasecmp(t->key, "title") &&
++ av_strcasecmp(t->key, "encoding_tool"))
+ mkv_write_simpletag(s->pb, t);
+
+ end_ebml_master(s->pb, tag);
+@@ -936,7 +939,10 @@
+ segment_uid[i] = av_lfg_get(&lfg);
+
+ put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , LIBAVFORMAT_IDENT);
+- put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
++ if ((tag = av_dict_get(s->metadata, "encoding_tool", NULL, 0)))
++ put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, tag->value);
++ else
++ put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
+ put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16);
+ }
+
+@@ -1199,9 +1205,18 @@
+ AVIOContext *pb = s->pb->seekable ? s->pb : mkv->dyn_bc;
+ AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
+ int ret, keyframe = !!(pkt->flags & AV_PKT_FLAG_KEY);
+- int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts;
++ int64_t ts;
+ int cluster_size = avio_tell(pb) - (s->pb->seekable ? mkv->cluster_pos : 0);
+
++ if (pkt->dts < 0 && !mkv->ts_offset)
++ mkv->ts_offset = -pkt->dts;
++
++ pkt->dts += mkv->ts_offset;
++ if (pkt->pts != AV_NOPTS_VALUE)
++ pkt->pts += mkv->ts_offset;
++
++ ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts;
++
+ // start a new cluster every 5 MB or 5 sec, or 32k / 1 sec for streaming or
+ // after 4k and on a keyframe
+ if (mkv->cluster_pos &&
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/mov.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/mov.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/mov.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/mov.c 2014-06-28 17:33:25.563523588 +0200
+@@ -300,7 +300,7 @@
+ if (parse)
+ parse(c, pb, str_size, key);
+ else {
+- if (data_type == 3 || (data_type == 0 && langcode < 0x800)) { // MAC Encoded
++ if (data_type == 3 || (data_type == 0 && (langcode < 0x400 || langcode == 0x7fff))) { // MAC Encoded
+ mov_read_mac_string(c, pb, str_size, str, sizeof(str));
+ } else {
+ avio_read(pb, str, str_size);
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/movenc.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/movenc.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/movenc.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/movenc.c 2014-06-28 17:33:25.563523588 +0200
+@@ -1806,7 +1806,8 @@
+ mov_write_string_metadata(s, pb, "\251wrt", "composer" , 1);
+ mov_write_string_metadata(s, pb, "\251alb", "album" , 1);
+ mov_write_string_metadata(s, pb, "\251day", "date" , 1);
+- mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
++ if (!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1))
++ mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
+ mov_write_string_metadata(s, pb, "\251cmt", "comment" , 1);
+ mov_write_string_metadata(s, pb, "\251gen", "genre" , 1);
+ mov_write_string_metadata(s, pb, "\251cpy", "copyright", 1);
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/mp3enc.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/mp3enc.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/mp3enc.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/mp3enc.c 2014-06-28 17:33:25.566856908 +0200
+@@ -118,8 +118,11 @@
+ MPADecodeHeader mpah;
+ int srate_idx, i, channels;
+ int bitrate_idx;
++ int best_bitrate_idx;
++ int best_bitrate_error = INT_MAX;
+ int xing_offset;
+ int ver = 0;
++ int lsf, bytes_needed;
+
+ if (!s->pb->seekable)
+ return;
+@@ -149,21 +152,51 @@
+ return;
+ }
+
+- /* 64 kbps frame, should be large enough */
+- bitrate_idx = (ver == 3) ? 5 : 8;
+-
+ /* dummy MPEG audio header */
+ header = 0xff << 24; // sync
+ header |= (0x7 << 5 | ver << 3 | 0x1 << 1 | 0x1) << 16; // sync/audio-version/layer 3/no crc*/
+- header |= (bitrate_idx << 4 | srate_idx << 2) << 8;
++ header |= (srate_idx << 2) << 8;
+ header |= channels << 6;
++
++ lsf = !((header & (1 << 20) && header & (1 << 19)));
++
++ xing_offset = xing_offtbl[ver != 3][channels == 1];
++ bytes_needed = 4 // header
++ + xing_offset
++ + 4 // xing tag
++ + 4 // frames/size/toc flags
++ + 4 // frames
++ + 4 // size
++ + XING_TOC_SIZE; // toc
++
++ for (bitrate_idx = 1; bitrate_idx < 15; bitrate_idx++) {
++ int bit_rate = 1000 * avpriv_mpa_bitrate_tab[lsf][3 - 1][bitrate_idx];
++ int error = FFABS(bit_rate - codec->bit_rate);
++
++ if (error < best_bitrate_error){
++ best_bitrate_error = error;
++ best_bitrate_idx = bitrate_idx;
++ }
++ }
++
++ for (bitrate_idx = best_bitrate_idx; bitrate_idx < 15; bitrate_idx++) {
++ int32_t mask = bitrate_idx << (4 + 8);
++ header |= mask;
++
++ avpriv_mpegaudio_decode_header(&mpah, header);
++
++ if (bytes_needed <= mpah.frame_size)
++ break;
++
++ header &= ~mask;
++ }
++
+ avio_wb32(s->pb, header);
+
+ avpriv_mpegaudio_decode_header(&mpah, header);
+
+ av_assert0(mpah.frame_size >= XING_MAX_SIZE);
+
+- xing_offset = xing_offtbl[ver != 3][codec->channels == 1];
+ ffio_fill(s->pb, 0, xing_offset);
+ mp3->xing_offset = avio_tell(s->pb);
+ ffio_wfourcc(s->pb, "Xing");
+@@ -179,8 +212,7 @@
+ for (i = 0; i < XING_TOC_SIZE; i++)
+ avio_w8(s->pb, 255 * i / XING_TOC_SIZE);
+
+- mpah.frame_size -= 4 + xing_offset + 4 + 4 + 4 + 4 + XING_TOC_SIZE;
+- ffio_fill(s->pb, 0, mpah.frame_size);
++ ffio_fill(s->pb, 0, mpah.frame_size - bytes_needed);
+ }
+
+ /*
+@@ -219,13 +251,16 @@
+
+ if (mp3->xing_offset && pkt->size >= 4) {
+ MPADecodeHeader c;
++ uint32_t h;
+
+- avpriv_mpegaudio_decode_header(&c, AV_RB32(pkt->data));
+-
+- if (!mp3->initial_bitrate)
+- mp3->initial_bitrate = c.bit_rate;
+- if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))
+- mp3->has_variable_bitrate = 1;
++ h = AV_RB32(pkt->data);
++ if (ff_mpa_check_header(h) == 0) {
++ avpriv_mpegaudio_decode_header(&c, h);
++ if (!mp3->initial_bitrate)
++ mp3->initial_bitrate = c.bit_rate;
++ if ((c.bit_rate == 0) || (mp3->initial_bitrate != c.bit_rate))
++ mp3->has_variable_bitrate = 1;
++ }
+
+ mp3_xing_add_frame(mp3, pkt);
+ }
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/oggdec.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/oggdec.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/oggdec.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/oggdec.c 2014-06-28 17:33:25.566856908 +0200
+@@ -46,6 +46,7 @@
+ &ff_theora_codec,
+ &ff_flac_codec,
+ &ff_celt_codec,
++ &ff_opus_codec,
+ &ff_old_dirac_codec,
+ &ff_old_flac_codec,
+ &ff_ogm_video_codec,
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/oggdec.h gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/oggdec.h
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/oggdec.h 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/oggdec.h 2014-06-28 17:33:25.566856908 +0200
+@@ -116,6 +116,7 @@
+ extern const struct ogg_codec ff_ogm_video_codec;
+ extern const struct ogg_codec ff_old_dirac_codec;
+ extern const struct ogg_codec ff_old_flac_codec;
++extern const struct ogg_codec ff_opus_codec;
+ extern const struct ogg_codec ff_skeleton_codec;
+ extern const struct ogg_codec ff_speex_codec;
+ extern const struct ogg_codec ff_theora_codec;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/oggparseopus.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/oggparseopus.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/oggparseopus.c 1970-01-01 01:00:00.000000000 +0100
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/oggparseopus.c 2014-06-28 17:33:25.566856908 +0200
+@@ -0,0 +1,142 @@
++/*
++ * Opus parser for Ogg
++ * Copyright (c) 2012 Nicolas George
++ *
++ * This file is part of Libav.
++ *
++ * Libav is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * Libav is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with Libav; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include <string.h>
++
++#include "libavutil/intreadwrite.h"
++#include "avformat.h"
++#include "internal.h"
++#include "oggdec.h"
++
++struct oggopus_private {
++ int need_comments;
++ unsigned pre_skip;
++ int64_t cur_dts;
++};
++
++#define OPUS_HEAD_SIZE 19
++
++static int opus_header(AVFormatContext *avf, int idx)
++{
++ struct ogg *ogg = avf->priv_data;
++ struct ogg_stream *os = &ogg->streams[idx];
++ AVStream *st = avf->streams[idx];
++ struct oggopus_private *priv = os->private;
++ uint8_t *packet = os->buf + os->pstart;
++ uint8_t *extradata;
++
++ if (!priv) {
++ priv = os->private = av_mallocz(sizeof(*priv));
++ if (!priv)
++ return AVERROR(ENOMEM);
++ }
++ if (os->flags & OGG_FLAG_BOS) {
++ if (os->psize < OPUS_HEAD_SIZE || (AV_RL8(packet + 8) & 0xF0) != 0)
++ return AVERROR_INVALIDDATA;
++
++ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
++ st->codec->codec_id = AV_CODEC_ID_OPUS;
++ st->codec->channels = AV_RL8(packet + 9);
++ priv->pre_skip = AV_RL16(packet + 10);
++
++ extradata = av_malloc(os->psize + FF_INPUT_BUFFER_PADDING_SIZE);
++ if (!extradata)
++ return AVERROR(ENOMEM);
++
++ memcpy(extradata, packet, os->psize);
++ st->codec->extradata = extradata;
++ st->codec->extradata_size = os->psize;
++
++ st->codec->sample_rate = 48000;
++ avpriv_set_pts_info(st, 64, 1, 48000);
++ priv->need_comments = 1;
++ return 1;
++ }
++
++ if (priv->need_comments) {
++ if (os->psize < 8 || memcmp(packet, "OpusTags", 8))
++ return AVERROR_INVALIDDATA;
++ ff_vorbis_comment(avf, &st->metadata, packet + 8, os->psize - 8);
++ priv->need_comments--;
++ return 1;
++ }
++
++ return 0;
++}
++
++static int opus_packet(AVFormatContext *avf, int idx)
++{
++ struct ogg *ogg = avf->priv_data;
++ struct ogg_stream *os = &ogg->streams[idx];
++ AVStream *st = avf->streams[idx];
++ struct oggopus_private *priv = os->private;
++ uint8_t *packet = os->buf + os->pstart;
++ unsigned toc, toc_config, toc_count, frame_size, nb_frames = 1;
++
++ if (!os->psize)
++ return AVERROR_INVALIDDATA;
++
++ toc = *packet;
++ toc_config = toc >> 3;
++ toc_count = toc & 3;
++ frame_size = toc_config < 12 ? FFMAX(480, 960 * (toc_config & 3)) :
++ toc_config < 16 ? 480 << (toc_config & 1) :
++ 120 << (toc_config & 3);
++ if (toc_count == 3) {
++ if (os->psize < 2)
++ return AVERROR_INVALIDDATA;
++ nb_frames = packet[1] & 0x3F;
++ } else if (toc_count) {
++ nb_frames = 2;
++ }
++
++ os->pduration = frame_size * nb_frames;
++ if (os->lastpts != AV_NOPTS_VALUE) {
++ if (st->start_time == AV_NOPTS_VALUE)
++ st->start_time = os->lastpts;
++ priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
++ }
++
++ priv->cur_dts += os->pduration;
++ if ((os->flags & OGG_FLAG_EOS)) {
++ int64_t skip = priv->cur_dts - os->granule + priv->pre_skip;
++ skip = FFMIN(skip, os->pduration);
++ if (skip > 0) {
++ os->pduration = skip < os->pduration ? os->pduration - skip : 1;
++ av_log(avf, AV_LOG_WARNING,
++ "Last packet is truncated to %d (because of unimplemented end trim support).\n",
++ os->pduration);
++ return AVERROR_PATCHWELCOME;
++ }
++ }
++
++ return 0;
++}
++
++const struct ogg_codec ff_opus_codec = {
++ .name = "Opus",
++ .magic = "OpusHead",
++ .magicsize = 8,
++ .header = opus_header,
++ .packet = opus_packet,
++ .granule_is_start = 1,
++ .nb_header = 1,
++};
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/rtmpproto.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/rtmpproto.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/rtmpproto.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/rtmpproto.c 2014-06-28 17:33:25.566856908 +0200
+@@ -2443,7 +2443,7 @@
+ if ((ret = gen_connect(s, rt)) < 0)
+ goto fail;
+ } else {
+- if (read_connect(s, s->priv_data) < 0)
++ if ((ret = read_connect(s, s->priv_data)) < 0)
+ goto fail;
+ rt->is_input = 1;
+ }
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavformat/version.h gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/version.h
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavformat/version.h 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavformat/version.h 2014-06-28 17:33:25.566856908 +0200
+@@ -31,7 +31,7 @@
+
+ #define LIBAVFORMAT_VERSION_MAJOR 54
+ #define LIBAVFORMAT_VERSION_MINOR 20
+-#define LIBAVFORMAT_VERSION_MICRO 3
++#define LIBAVFORMAT_VERSION_MICRO 4
+
+ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
+ LIBAVFORMAT_VERSION_MINOR, \
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavresample/resample.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavresample/resample.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavresample/resample.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavresample/resample.c 2014-06-28 17:33:25.566856908 +0200
+@@ -46,6 +46,7 @@
+ void (*resample_one)(struct ResampleContext *c, int no_filter, void *dst0,
+ int dst_index, const void *src0, int src_size,
+ int index, int frac);
++ int padding_size;
+ };
+
+
+@@ -211,6 +212,7 @@
+ goto error;
+ c->ideal_dst_incr = c->dst_incr;
+
++ c->padding_size = (c->filter_length - 1) / 2;
+ c->index = -phase_count * ((c->filter_length - 1) / 2);
+ c->frac = 0;
+
+@@ -461,8 +463,10 @@
+
+ int avresample_get_delay(AVAudioResampleContext *avr)
+ {
++ ResampleContext *c = avr->resample;
++
+ if (!avr->resample_needed || !avr->resample)
+ return 0;
+
+- return avr->resample->buffer->nb_samples;
++ return FFMAX(c->buffer->nb_samples - c->padding_size, 0);
+ }
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavresample/utils.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavresample/utils.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavresample/utils.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavresample/utils.c 2014-06-28 17:33:25.566856908 +0200
+@@ -117,7 +117,7 @@
+ }
+ if (avr->resample_needed) {
+ avr->resample_out_buffer = ff_audio_data_alloc(avr->out_channels,
+- 0, avr->internal_sample_fmt,
++ 1024, avr->internal_sample_fmt,
+ "resample_out_buffer");
+ if (!avr->resample_out_buffer) {
+ ret = AVERROR(EINVAL);
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libavutil/lzo.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavutil/lzo.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libavutil/lzo.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libavutil/lzo.c 2014-06-28 17:33:25.566856908 +0200
+@@ -80,6 +80,10 @@
+ {
+ register const uint8_t *src = c->in;
+ register uint8_t *dst = c->out;
++ if (cnt < 0) {
++ c->error |= AV_LZO_ERROR;
++ return;
++ }
+ if (cnt > c->in_end - src) {
+ cnt = FFMAX(c->in_end - src, 0);
+ c->error |= AV_LZO_INPUT_DEPLETED;
+@@ -103,7 +107,7 @@
+ /**
+ * @brief Copies previously decoded bytes to current position.
+ * @param back how many bytes back we start
+- * @param cnt number of bytes to copy, must be >= 0
++ * @param cnt number of bytes to copy, must be > 0
+ *
+ * cnt > back is valid, this will copy the bytes we just copied,
+ * thus creating a repeating pattern with a period length of back.
+@@ -111,6 +115,10 @@
+ static inline void copy_backptr(LZOContext *c, int back, int cnt)
+ {
+ register uint8_t *dst = c->out;
++ if (cnt <= 0) {
++ c->error |= AV_LZO_ERROR;
++ return;
++ }
+ if (dst - c->out_start < back) {
+ c->error |= AV_LZO_INVALID_BACKPTR;
+ return;
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/libswscale/utils.c gst-libav-1.2.4-9.14/gst-libs/ext/libav/libswscale/utils.c
+--- gst-libav-1.2.4/gst-libs/ext/libav/libswscale/utils.c 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/libswscale/utils.c 2014-06-28 17:33:25.566856908 +0200
+@@ -316,7 +316,7 @@
+
+ xDstInSrc = xInc - 0x10000;
+ for (i = 0; i < dstW; i++) {
+- int xx = (xDstInSrc - ((filterSize - 2) << 16)) / (1 << 17);
++ int xx = (xDstInSrc - ((int64_t)(filterSize - 2) << 16)) / (1 << 17);
+ int j;
+ (*filterPos)[i] = xx;
+ for (j = 0; j < filterSize; j++) {
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/RELEASE gst-libav-1.2.4-9.14/gst-libs/ext/libav/RELEASE
+--- gst-libav-1.2.4/gst-libs/ext/libav/RELEASE 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/RELEASE 2014-06-28 17:33:25.566856908 +0200
+@@ -1 +1 @@
+-9.12
++9.14
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/tests/ref/lavf/mkv gst-libav-1.2.4-9.14/gst-libs/ext/libav/tests/ref/lavf/mkv
+--- gst-libav-1.2.4/gst-libs/ext/libav/tests/ref/lavf/mkv 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/tests/ref/lavf/mkv 2014-06-28 17:33:25.566856908 +0200
+@@ -1,3 +1,3 @@
+-2c6fbc2c818c849e77702141294d775d *./tests/data/lavf/lavf.mkv
++af61b3dcd6a9d2608c2368136c96b437 *./tests/data/lavf/lavf.mkv
+ 320262 ./tests/data/lavf/lavf.mkv
+ ./tests/data/lavf/lavf.mkv CRC=0xd86284dd
+diff -u -Nr gst-libav-1.2.4/gst-libs/ext/libav/tests/ref/seek/lavf-mkv gst-libav-1.2.4-9.14/gst-libs/ext/libav/tests/ref/seek/lavf-mkv
+--- gst-libav-1.2.4/gst-libs/ext/libav/tests/ref/seek/lavf-mkv 2014-04-18 12:30:33.000000000 +0200
++++ gst-libav-1.2.4-9.14/gst-libs/ext/libav/tests/ref/seek/lavf-mkv 2014-06-28 17:33:25.566856908 +0200
+@@ -1,53 +1,53 @@
+-ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 512 size: 208
+-ret: 0 st:-1 flags:0 ts:-1.000000
+ ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
++ret: 0 st:-1 flags:0 ts:-1.000000
++ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
+ ret: 0 st:-1 flags:1 ts: 1.894167
+-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
++ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
+ ret: 0 st: 0 flags:0 ts: 0.788000
+-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
++ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
+ ret: 0 st: 0 flags:1 ts:-0.317000
+-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
++ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
+ ret: 0 st: 1 flags:0 ts: 2.577000
+ ret:-EOF
+ ret: 0 st: 1 flags:1 ts: 1.471000
+-ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 319991 size: 209
++ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
+ ret: 0 st:-1 flags:0 ts: 0.365002
+-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146703 size: 27925
++ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146703 size: 27925
+ ret: 0 st:-1 flags:1 ts:-0.740831
+-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
++ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
+ ret: 0 st: 0 flags:0 ts: 2.153000
+ ret:-EOF
+ ret: 0 st: 0 flags:1 ts: 1.048000
+-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
++ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
+ ret: 0 st: 1 flags:0 ts:-0.058000
+-ret: 0 st: 1 flags:1 dts: 0.015000 pts: 0.015000 pos: 512 size: 208
++ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
+ ret: 0 st: 1 flags:1 ts: 2.836000
+-ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 319991 size: 209
++ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
+ ret: 0 st:-1 flags:0 ts: 1.730004
+ ret:-EOF
+ ret: 0 st:-1 flags:1 ts: 0.624171
+-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146703 size: 27925
++ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146703 size: 27925
+ ret: 0 st: 0 flags:0 ts:-0.482000
+-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
++ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
+ ret: 0 st: 0 flags:1 ts: 2.413000
+-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
++ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
+ ret: 0 st: 1 flags:0 ts: 1.307000
+ ret:-EOF
+ ret: 0 st: 1 flags:1 ts: 0.201000
+-ret: 0 st: 1 flags:1 dts: 0.015000 pts: 0.015000 pos: 512 size: 208
+-ret: 0 st:-1 flags:0 ts:-0.904994
+ ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
++ret: 0 st:-1 flags:0 ts:-0.904994
++ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
+ ret: 0 st:-1 flags:1 ts: 1.989173
+-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
++ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
+ ret: 0 st: 0 flags:0 ts: 0.883000
+-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
++ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292150 size: 27834
+ ret: 0 st: 0 flags:1 ts:-0.222000
+-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
++ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
+ ret: 0 st: 1 flags:0 ts: 2.672000
+ ret:-EOF
+ ret: 0 st: 1 flags:1 ts: 1.566000
+-ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 319991 size: 209
++ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
+ ret: 0 st:-1 flags:0 ts: 0.460008
+-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146703 size: 27925
++ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146703 size: 27925
+ ret: 0 st:-1 flags:1 ts:-0.645825
+-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
++ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 728 size: 27837
diff --git a/extra/hyphen/PKGBUILD b/extra/hyphen/PKGBUILD
index 946ce0fd2..a27a64924 100644
--- a/extra/hyphen/PKGBUILD
+++ b/extra/hyphen/PKGBUILD
@@ -1,22 +1,19 @@
-# $Id: PKGBUILD 198105 2013-10-30 12:49:16Z allan $
+# $Id: PKGBUILD 215532 2014-06-28 08:56:08Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgbase=hyphen
pkgname=('hyphen' 'hyphen-en')
-pkgver=2.8.6
+pkgver=2.8.7
pkgrel=1
arch=('i686' 'x86_64')
url="http://hunspell.sf.net"
-license=('GPL' 'LGPL' 'MPL')
+license=('GPL2' 'LGPL2.1' 'MPL')
makedepends=('glibc' 'perl')
source=(http://downloads.sourceforge.net/hunspell/${pkgname}-${pkgver}.tar.gz)
-md5sums=('ee527b48ef1a7e95ee803a1f7c283c56')
+sha1sums=('ca565779e89ca299475e7eb993612b722c09e9e0')
build() {
cd "$srcdir/$pkgname-$pkgver"
- # libtool fix
-# autoreconf -vfi
-
./configure --prefix=/usr --disable-static
make
}
diff --git a/extra/libmythes/PKGBUILD b/extra/libmythes/PKGBUILD
index 0efb1cbad..12603747f 100644
--- a/extra/libmythes/PKGBUILD
+++ b/extra/libmythes/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 198206 2013-10-30 13:27:08Z allan $
+# $Id: PKGBUILD 215530 2014-06-28 08:51:10Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgname=libmythes
-pkgver=1.2.3
+pkgver=1.2.4
pkgrel=1
epoch=1
pkgdesc="a simple thesaurus"
@@ -13,12 +13,16 @@ depends=('glibc' 'perl')
makedepends=('hunspell')
provides=('mythes')
source=(http://downloads.sourceforge.net/hunspell/${pkgname/lib/}-${pkgver}.tar.gz)
-md5sums=('46e92b68e31e858512b680b3b61dc4c1')
+sha1sums=('c038831d84882cdf639e038e44decb1e40527591')
build() {
- cd ${srcdir}/${pkgname/lib/}-$pkgver
+ cd ${pkgname/lib/}-$pkgver
./configure --prefix=/usr --disable-static
make
+}
+
+check() {
+ cd ${pkgname/lib/}-$pkgver
# run the example program:
./example th_en_US_new.idx th_en_US_new.dat checkme.lst
# run the example program with stemming and morphological generation:
@@ -27,7 +31,7 @@ build() {
}
package() {
- cd ${srcdir}/${pkgname/lib/}-$pkgver
+ cd ${pkgname/lib/}-$pkgver
make DESTDIR=$pkgdir install
# license
install -Dm644 ${srcdir}/${pkgname/lib/}-$pkgver/COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
diff --git a/extra/xf86-video-modesetting/PKGBUILD b/extra/xf86-video-modesetting/PKGBUILD
index eb45b8e1e..eea7acc9b 100644
--- a/extra/xf86-video-modesetting/PKGBUILD
+++ b/extra/xf86-video-modesetting/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 203625 2014-01-13 17:13:05Z andyrtr $
+# $Id: PKGBUILD 215534 2014-06-28 09:03:09Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
pkgname=xf86-video-modesetting
-pkgver=0.8.1
-pkgrel=2
+pkgver=0.9.0
+pkgrel=1
pkgdesc="X.org generic modesetting video driver"
arch=('i686' 'x86_64')
url="http://xorg.freedesktop.org/"
@@ -15,7 +15,7 @@ conflicts=('xorg-server<1.15.0' 'X-ABI-VIDEODRV_VERSION<15' 'X-ABI-VIDEODRV_VERS
groups=('xorg-drivers' 'xorg')
groups=('xorg-drivers' 'xorg')
source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('3ba8d8d7cb679497abc6486e2e843f8ea1582d830a27448ed4c90413e58312ca')
+sha256sums=('90cf085573203dfadd48ea69bd694c4d04ccbe088b6855e9c85c34bb8a95d75c')
build() {
cd ${pkgname}-${pkgver}