Commit 10799d2f authored by Natanael Copa's avatar Natanael Copa

main/ffmpeg2.8: remove

we only support ffmpeg 3 now
parent f8783786
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ffmpeg2.8
pkgver=2.8.10
pkgrel=1
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
url="http://ffmpeg.org/"
arch="all"
license="GPL"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
makedepends="gnutls-dev lame-dev libvorbis-dev xvidcore-dev zlib-dev
imlib2-dev x264-dev libtheora-dev coreutils bzip2-dev perl-dev libvpx-dev
libvpx-dev sdl-dev libxfixes-dev libva-dev alsa-lib-dev rtmpdump-dev
v4l-utils-dev yasm opus-dev x265-dev"
depends=
source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2
configure-dlvsym.patch
fix-flv-extradata.patch
"
_builddir="$srcdir"/ffmpeg-$pkgver
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
local _dbg="--disable-debug"
local _asm=""
[ -n "$DEBUG" ] && _dbg="--enable-debug"
case "$CARCH" in
x86 | ppc* | arm*) _asm="--disable-asm" ;;
esac
cd "$_builddir"
./configure \
--prefix=/usr \
--enable-avresample \
--enable-avfilter \
--enable-gnutls \
--enable-gpl \
--enable-libmp3lame \
--enable-librtmp \
--enable-libvorbis \
--enable-libvpx \
--enable-libxvid \
--enable-libx264 \
--enable-libx265 \
--enable-libtheora \
--enable-libv4l2 \
--enable-postproc \
--enable-pic \
--enable-pthreads \
--enable-shared \
--enable-x11grab \
--disable-stripping \
--disable-static \
--enable-vaapi \
--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
}
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
}
libs() {
pkgdesc="Libraries for ffmpeg"
replaces="ffmpeg"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}
sha512sums="1ca8b0060361c49de201afc463bcd7c9340f09bbd116dff2539653bc36411d60cdf667874d2ec51664e141ee7a7be8bebc94e158687cb97db6bdfa40f00ec193 ffmpeg-2.8.10.tar.bz2
d9bb652093b1c2d03cead78bcafd59fc8305f36fe5359ac5d7caf038889f1239829e288c07e77a11bbef89de5fe54a5eae50a1c4718ec77137bb677ef9069e54 configure-dlvsym.patch
d4d369055ef9ec8742f971786b05b89a5748a32cee711f623b71e8aea54b004bebda4e618017a351162647360632b13bcc7f09059938734e692ec841fe769c46 fix-flv-extradata.patch"
--- ./configure.orig
+++ ./configure
@@ -1680,6 +1680,7 @@
CoTaskMemFree
CryptGenRandom
dlopen
+ dlvsym
fcntl
flt_lim
fork
@@ -4997,14 +4998,15 @@
-Wl,--wrap,sws_scale ||
disable xmm_clobber_test
+check_func dlvsym -lld
echo "X{};" > $TMPV
if test_ldflags -Wl,--version-script,$TMPV; then
append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
- check_cc <<EOF && enable symver_asm_label
+ enabled dlvsym && check_cc <<EOF && enable symver_asm_label
void ff_foo(void) __asm__ ("av_foo@VERSION");
void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
EOF
- check_cc <<EOF && enable symver_gnu_asm
+ enabled dlvsym && check_cc <<EOF && enable symver_gnu_asm
__asm__(".symver ff_foo,av_foo@VERSION");
void ff_foo(void) {}
EOF
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