Commit 51f6ecf5 authored by tmpfile's avatar tmpfile Committed by Natanael Copa

main/ffmpeg: upgrade to 3.3.2

parent 6f13cf17
......@@ -3,7 +3,7 @@
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ffmpeg
pkgver=3.2.5
pkgver=3.3.2
pkgrel=0
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
url="http://ffmpeg.org/"
......@@ -16,14 +16,8 @@ makedepends="gnutls-dev lame-dev libvorbis-dev xvidcore-dev zlib-dev libvdpau-de
v4l-utils-dev yasm opus-dev x265-dev"
source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2
0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
cflags-speed-O2.patch
"
# secfixes:
# 3.2.4-r0:
# - CVE-2017-5024
# - CVE-2017-5025
builddir="$srcdir/$pkgname-$pkgver"
build() {
......@@ -55,24 +49,23 @@ build() {
--enable-pic \
--enable-pthreads \
--enable-shared \
--enable-x11grab \
--enable-libxcb \
--disable-stripping \
--disable-static \
--enable-vaapi \
--enable-vdpau \
--enable-libopus \
$_asm $_dbg \
|| return 1
make || return 1
${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c || return 1
make doc/ffmpeg.1 doc/ffplay.1 doc/ffserver.1 || return 1
$_asm $_dbg
make
${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c
make doc/ffmpeg.1 doc/ffplay.1 doc/ffserver.1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install install-man || return 1
install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart" || return 1
# strip --strip-debug "$pkgdir"/usr/lib/*.a || return 1
make DESTDIR="$pkgdir" install install-man
install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart"
# strip --strip-debug "$pkgdir"/usr/lib/*.a
}
libs() {
......@@ -82,6 +75,5 @@ libs() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}
sha512sums="304a10c9bafce163d2bfe79fcf989bdd919d6361cb188acf3ebba32094df1ba23e66468a11f789392589e4f1f6c9e9dd7edfaadf999b92ee8540301723fd6501 ffmpeg-3.2.5.tar.bz2
32652e18d4eb231a2e32ad1cacffdf33264aac9d459e0e2e6dd91484fced4e1ca5a62886057b1f0b4b1589c014bbe793d17c78adbaffec195f9a75733b5b18cb 0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
5ff940abb4265401eebb0f2fd486b51a004d62a480c5a64bc279149731b577b5c95f0b7ff2d73429ec10b1f0b76ecf7fa466b02ba3a0bf79d9b7ac2ae87ee5d5 cflags-speed-O2.patch"
sha512sums="673f18b2935d23703e5f325a2c951c69f49b2598acdf1bf3987487eecd246670f792d4363def6832bb17f16cb0e919994cd79141d1d95c8112644c979fb8b796 ffmpeg-3.3.2.tar.bz2
32652e18d4eb231a2e32ad1cacffdf33264aac9d459e0e2e6dd91484fced4e1ca5a62886057b1f0b4b1589c014bbe793d17c78adbaffec195f9a75733b5b18cb 0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch"
gcc fails if we compile with -O3
libavcodec/sbrdsp.c: In function 'sbr_neg_odd_64_c':
libavcodec/sbrdsp.c:47:13: internal compiler error: in vect_analyze_data_ref_accesses, at tree-vect-data-refs.c:2596
static void sbr_neg_odd_64_c(float *x)
^
We work around it by using -O2 which is more sane.
http://bugs.alpinelinux.org/issues/5334
diff --git a/configure b/configure
index 5e788ac..aa34f9b 100755
--- a/configure
+++ b/configure
@@ -3795,7 +3795,7 @@ probe_cc(){
warn "gcc 4.2 is outdated and may miscompile FFmpeg. Please use a newer compiler." ;;
esac
fi
- _cflags_speed='-O3'
+ _cflags_speed='-O2'
_cflags_size='-Os'
elif $_cc --version 2>/dev/null | grep -q ^icc; then
_type=icc
https://trac.ffmpeg.org/ticket/3175
This patch is slightly cleaned up version of:
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157791.html
diff -ru ffmpeg-2.3.4.orig/libavformat/flvenc.c ffmpeg-2.3.4/libavformat/flvenc.c
--- ffmpeg-2.3.4.orig/libavformat/flvenc.c 2014-10-03 04:49:20.000000000 -0300
+++ ffmpeg-2.3.4/libavformat/flvenc.c 2014-12-04 11:37:23.286586875 -0200
@@ -414,11 +414,35 @@
if (enc->codec_id == AV_CODEC_ID_AAC) {
avio_w8(pb, get_audio_flags(s, enc));
avio_w8(pb, 0); // AAC sequence header
+ if (enc->extradata_size < 2) {
+ static const int mpeg4audio_sample_rates[16] = {
+ 96000, 88200, 64000, 48000, 44100, 32000,
+ 24000, 22050, 16000, 12000, 11025, 8000, 7350
+ };
+ int sample_rate_index;
+
+ av_log(s, AV_LOG_WARNING, "AAC extradata empty!.\n");
+ for (sample_rate_index = 0; sample_rate_index < 16; sample_rate_index++)
+ if (enc->sample_rate == mpeg4audio_sample_rates[sample_rate_index])
+ break;
+
+ if (sample_rate_index < 16 && (enc->extradata = av_mallocz(2)) != NULL) {
+ enc->extradata_size = 2;
+ enc->extradata[0] = 0x10 | (sample_rate_index>>1);
+ enc->extradata[1] = (sample_rate_index & 0x01)<<7 | enc->channels <<3;
+ }
+ }
+ if (enc->extradata_size >= 2)
+ av_log(s, AV_LOG_DEBUG, "AAC extradata size %d: %02x:%02x.\n", enc->extradata_size, enc->extradata[0], enc->extradata[1]);
avio_write(pb, enc->extradata, enc->extradata_size);
} else {
avio_w8(pb, enc->codec_tag | FLV_FRAME_KEY); // flags
avio_w8(pb, 0); // AVC sequence header
avio_wb24(pb, 0); // composition time
+ if(enc->extradata_size>=2)
+ av_log(s, AV_LOG_DEBUG, "Video extradata size %d: %02x:%02x.\n", enc->extradata_size, enc->extradata[0], enc->extradata[1]);
+ else
+ av_log(s, AV_LOG_WARNING, "Video extradata empty!.\n");
ff_isom_write_avcc(pb, enc->extradata, enc->extradata_size);
}
data_size = avio_tell(pb) - pos;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment