diff options
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_2.8.5.bb (renamed from meta/recipes-multimedia/libav/libav.inc) | 76 | ||||
-rw-r--r-- | meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch | 99 | ||||
-rw-r--r-- | meta/recipes-multimedia/libav/libav_9.18.bb | 6 | ||||
-rw-r--r-- | meta/recipes-multimedia/libav/libpostproc_git.bb | 49 |
4 files changed, 17 insertions, 213 deletions
diff --git a/meta/recipes-multimedia/libav/libav.inc b/meta/recipes-multimedia/ffmpeg/ffmpeg_2.8.5.bb index 371e0664cf..7107803c46 100644 --- a/meta/recipes-multimedia/libav/libav.inc +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_2.8.5.bb | |||
@@ -1,10 +1,8 @@ | |||
1 | SUMMARY = "Open source audio and video processing tools and librairies" | 1 | SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video." |
2 | DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \ | 2 | DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \ |
3 | with a set of portable, functional and high-performance libraries for \ | 3 | mux, demux, stream, filter and play pretty much anything that humans and machines \ |
4 | dealing with multimedia formats of all sorts. It originates from the \ | 4 | have created. It supports the most obscure ancient formats up to the cutting edge." |
5 | FFmpeg codebase, but goes its own way these days, providing its users \ | 5 | HOMEPAGE = "https://www.ffmpeg.org/" |
6 | with reliable releases and a clear vision how to go forward." | ||
7 | HOMEPAGE = "http://libav.org/" | ||
8 | SECTION = "libs" | 6 | SECTION = "libs" |
9 | 7 | ||
10 | LICENSE = "GPLv2+" | 8 | LICENSE = "GPLv2+" |
@@ -15,32 +13,22 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
15 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ | 13 | file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ |
16 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" | 14 | file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" |
17 | 15 | ||
18 | SRC_URI = "http://libav.org/releases/${BP}.tar.xz" | 16 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz" |
19 | 17 | ||
20 | # Provides ffmpeg compat, see http://libav.org/about.html | 18 | SRC_URI[md5sum] = "b34164bd181f4f81c21da3dd131d919d" |
21 | PROVIDES = "ffmpeg" | 19 | SRC_URI[sha256sum] = "76fb83a267d2d1cb332742dadf28ad8b58af7958165f51bb1a2c226a122f0ac7" |
22 | 20 | ||
23 | ARM_INSTRUCTION_SET = "arm" | 21 | # Should be API compatible with libav (which was a fork of ffmpeg) |
22 | # libpostproc was previously packaged from a separate recipe | ||
23 | PROVIDES = "libav libpostproc" | ||
24 | 24 | ||
25 | DEPENDS = "alsa-lib zlib libogg yasm-native" | 25 | DEPENDS = "alsa-lib zlib libogg yasm-native libxv" |
26 | 26 | ||
27 | inherit autotools pkgconfig | 27 | inherit autotools pkgconfig |
28 | 28 | ||
29 | B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" | 29 | PACKAGECONFIG ??= "avdevice avfilter gpl theora x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" |
30 | |||
31 | FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
32 | FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
33 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" | ||
34 | |||
35 | EXTRA_FFCONF_armv7a = "--cpu=cortex-a8" | ||
36 | EXTRA_FFCONF_armv7ve = "--cpu=cortex-a8" | ||
37 | EXTRA_FFCONF ?= "" | ||
38 | |||
39 | PACKAGECONFIG ??= "avdevice avfilter avplay bzip2 gpl theora x264 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
40 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" | 30 | PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" |
41 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" | 31 | PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter" |
42 | PACKAGECONFIG[avplay] = "--enable-avplay,--disable-avplay" | ||
43 | PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2" | ||
44 | PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" | 32 | PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac" |
45 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" | 33 | PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" |
46 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" | 34 | PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" |
@@ -59,17 +47,14 @@ PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" | |||
59 | # Check codecs that require --enable-nonfree | 47 | # Check codecs that require --enable-nonfree |
60 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}" | 48 | USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}" |
61 | 49 | ||
62 | # libav will install in /usr/local if prefix is empty. Luckily, | ||
63 | # passing just "/" instead does the right thing. | ||
64 | nonempty_prefix = "${@bb.data.getVar('prefix', d, True) or '/'}" | ||
65 | |||
66 | EXTRA_OECONF = " \ | 50 | EXTRA_OECONF = " \ |
51 | --disable-stripping \ | ||
52 | --enable-pic \ | ||
67 | --enable-shared \ | 53 | --enable-shared \ |
68 | --enable-pthreads \ | 54 | --enable-pthreads \ |
69 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ | 55 | ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ |
70 | \ | 56 | \ |
71 | --cross-prefix=${TARGET_PREFIX} \ | 57 | --cross-prefix=${TARGET_PREFIX} \ |
72 | --prefix=${nonempty_prefix} \ | ||
73 | \ | 58 | \ |
74 | --ld="${CCLD}" \ | 59 | --ld="${CCLD}" \ |
75 | --arch=${TARGET_ARCH} \ | 60 | --arch=${TARGET_ARCH} \ |
@@ -82,37 +67,15 @@ EXTRA_OECONF = " \ | |||
82 | ${EXTRA_FFCONF} \ | 67 | ${EXTRA_FFCONF} \ |
83 | --libdir=${libdir} \ | 68 | --libdir=${libdir} \ |
84 | --shlibdir=${libdir} \ | 69 | --shlibdir=${libdir} \ |
70 | --datadir=${datadir}/ffmpeg \ | ||
85 | " | 71 | " |
86 | 72 | ||
87 | do_configure() { | 73 | do_configure() { |
88 | # We don't have TARGET_PREFIX-pkgconfig | ||
89 | sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure | ||
90 | mkdir -p ${B} | ||
91 | cd ${B} | ||
92 | ${S}/configure ${EXTRA_OECONF} | 74 | ${S}/configure ${EXTRA_OECONF} |
93 | sed -i -e s:Os:O4:g ${B}/config.h | ||
94 | } | 75 | } |
95 | 76 | ||
96 | do_install_append() { | ||
97 | if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'avfilter', 'yes', '', d)}" ]; then | ||
98 | install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/ | ||
99 | fi | ||
100 | } | ||
101 | |||
102 | PACKAGES += "${PN}-vhook ffmpeg-x264-presets" | ||
103 | PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*" | ||
104 | |||
105 | RSUGGESTS_${PN} = "mplayer" | 77 | RSUGGESTS_${PN} = "mplayer" |
106 | FILES_${PN} = "${bindir}" | 78 | PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*" |
107 | FILES_${PN}-dev = "${includedir}/${PN}" | ||
108 | |||
109 | FILES_${PN}-vhook = "${libdir}/vhook" | ||
110 | |||
111 | FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset" | ||
112 | |||
113 | LEAD_SONAME = "libavcodec.so" | ||
114 | |||
115 | FILES_${PN}-dev = "${includedir}" | ||
116 | 79 | ||
117 | python populate_packages_prepend() { | 80 | python populate_packages_prepend() { |
118 | av_libdir = d.expand('${libdir}') | 81 | av_libdir = d.expand('${libdir}') |
@@ -145,9 +108,4 @@ python populate_packages_prepend() { | |||
145 | prepend=True, | 108 | prepend=True, |
146 | allow_links=True) | 109 | allow_links=True) |
147 | 110 | ||
148 | if d.getVar('TARGET_ARCH', True) in [ 'i586', 'i686' ]: | ||
149 | # libav can't be build with -fPIC for 32-bit x86 | ||
150 | pkgs = d.getVar('PACKAGES', True).split() | ||
151 | for pkg in pkgs: | ||
152 | d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel') | ||
153 | } | 111 | } |
diff --git a/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch b/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch deleted file mode 100644 index 94213a74ef..0000000000 --- a/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | CVE: CVE-2014-9676 | ||
3 | |||
4 | Backport patch to fix CVE-2014-9676. | ||
5 | |||
6 | https://security-tracker.debian.org/tracker/CVE-2014-9676 | ||
7 | https://git.libav.org/?p=libav.git;a=commit;h=b3f04657368a32a9903406395f865e230b1de348 | ||
8 | |||
9 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
10 | --- | ||
11 | From b3f04657368a32a9903406395f865e230b1de348 Mon Sep 17 00:00:00 2001 | ||
12 | From: Luca Barbato <lu_zero@gentoo.org> | ||
13 | Date: Mon, 5 Jan 2015 10:40:41 +0100 | ||
14 | Subject: [PATCH] segment: Fix the failure paths | ||
15 | |||
16 | A failure in segment_end() or segment_start() would lead to freeing | ||
17 | a dangling pointer and in general further calls to seg_write_packet() | ||
18 | or to seg_write_trailer() would have the same faulty behaviour. | ||
19 | |||
20 | CC: libav-stable@libav.org | ||
21 | Reported-By: luodalongde@gmail.com | ||
22 | --- | ||
23 | libavformat/segment.c | 32 ++++++++++++++++++++------------ | ||
24 | 1 file changed, 20 insertions(+), 12 deletions(-) | ||
25 | |||
26 | diff --git a/libavformat/segment.c b/libavformat/segment.c | ||
27 | index 52da6b9..bcfd1f9 100644 | ||
28 | --- a/libavformat/segment.c | ||
29 | +++ b/libavformat/segment.c | ||
30 | @@ -184,6 +184,13 @@ static void close_null_ctx(AVIOContext *pb) | ||
31 | av_free(pb); | ||
32 | } | ||
33 | |||
34 | +static void seg_free_context(SegmentContext *seg) | ||
35 | +{ | ||
36 | + avio_closep(&seg->pb); | ||
37 | + avformat_free_context(seg->avf); | ||
38 | + seg->avf = NULL; | ||
39 | +} | ||
40 | + | ||
41 | static int seg_write_header(AVFormatContext *s) | ||
42 | { | ||
43 | SegmentContext *seg = s->priv_data; | ||
44 | @@ -265,12 +272,9 @@ static int seg_write_header(AVFormatContext *s) | ||
45 | } | ||
46 | |||
47 | fail: | ||
48 | - if (ret) { | ||
49 | - if (seg->list) | ||
50 | - avio_close(seg->pb); | ||
51 | - if (seg->avf) | ||
52 | - avformat_free_context(seg->avf); | ||
53 | - } | ||
54 | + if (ret < 0) | ||
55 | + seg_free_context(seg); | ||
56 | + | ||
57 | return ret; | ||
58 | } | ||
59 | |||
60 | @@ -282,6 +286,9 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) | ||
61 | int64_t end_pts = seg->recording_time * seg->number; | ||
62 | int ret, can_split = 1; | ||
63 | |||
64 | + if (!oc) | ||
65 | + return AVERROR(EINVAL); | ||
66 | + | ||
67 | if (seg->has_video) { | ||
68 | can_split = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && | ||
69 | pkt->flags & AV_PKT_FLAG_KEY; | ||
70 | @@ -322,11 +329,8 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) | ||
71 | ret = ff_write_chained(oc, pkt->stream_index, pkt, s); | ||
72 | |||
73 | fail: | ||
74 | - if (ret < 0) { | ||
75 | - if (seg->list) | ||
76 | - avio_close(seg->pb); | ||
77 | - avformat_free_context(oc); | ||
78 | - } | ||
79 | + if (ret < 0) | ||
80 | + seg_free_context(seg); | ||
81 | |||
82 | return ret; | ||
83 | } | ||
84 | @@ -335,7 +339,11 @@ static int seg_write_trailer(struct AVFormatContext *s) | ||
85 | { | ||
86 | SegmentContext *seg = s->priv_data; | ||
87 | AVFormatContext *oc = seg->avf; | ||
88 | - int ret; | ||
89 | + int ret = 0; | ||
90 | + | ||
91 | + if (!oc) | ||
92 | + goto fail; | ||
93 | + | ||
94 | if (!seg->write_header_trailer) { | ||
95 | if ((ret = segment_end(oc, 0)) < 0) | ||
96 | goto fail; | ||
97 | -- | ||
98 | 2.4.1.314.g9532ead | ||
99 | |||
diff --git a/meta/recipes-multimedia/libav/libav_9.18.bb b/meta/recipes-multimedia/libav/libav_9.18.bb deleted file mode 100644 index 210a649da4..0000000000 --- a/meta/recipes-multimedia/libav/libav_9.18.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | require libav.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "75e838068a75fb88e1b4ea0546bc16f0" | ||
4 | SRC_URI[sha256sum] = "0875e835da683eef1a7bac75e1884634194149d7479d1538ba9fbe1614d066d7" | ||
5 | |||
6 | SRC_URI += "file://libav-fix-CVE-2014-9676.patch" | ||
diff --git a/meta/recipes-multimedia/libav/libpostproc_git.bb b/meta/recipes-multimedia/libav/libpostproc_git.bb deleted file mode 100644 index 911ae863ae..0000000000 --- a/meta/recipes-multimedia/libav/libpostproc_git.bb +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | SUMMARY = "FFmpeg derived postprocessing library" | ||
2 | HOMEPAGE = "http://git.videolan.org/?p=libpostproc.git;a=summary" | ||
3 | SECTION = "libs" | ||
4 | DEPENDS = "libav" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
7 | |||
8 | # because it depends on libav which has commercial flag | ||
9 | LICENSE_FLAGS = "commercial" | ||
10 | |||
11 | PV = "52.3.0+git${SRCPV}" | ||
12 | |||
13 | SRCREV = "811db3b957dfde24aef2d0f82e297e5bf552d873" | ||
14 | SRC_URI = "git://github.com/lu-zero/postproc;protocol=https" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit autotools lib_package pkgconfig | ||
19 | |||
20 | FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
21 | FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
22 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" | ||
23 | |||
24 | EXTRA_FFCONF_armv7a = "--cpu=cortex-a8" | ||
25 | EXTRA_FFCONF_armv7ve = "--cpu=cortex-a8" | ||
26 | EXTRA_FFCONF ?= "" | ||
27 | |||
28 | EXTRA_OECONF = " \ | ||
29 | --enable-shared \ | ||
30 | --enable-pthreads \ | ||
31 | --enable-gpl \ | ||
32 | --enable-postproc \ | ||
33 | \ | ||
34 | --cross-prefix=${TARGET_PREFIX} \ | ||
35 | --prefix=${prefix} \ | ||
36 | \ | ||
37 | --arch=${TARGET_ARCH} \ | ||
38 | --target-os="linux" \ | ||
39 | --enable-cross-compile \ | ||
40 | --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ | ||
41 | --extra-ldflags="${TARGET_LDFLAGS}" \ | ||
42 | --sysroot="${STAGING_DIR_TARGET}" \ | ||
43 | --shlibdir="${libdir}" \ | ||
44 | ${EXTRA_FFCONF} \ | ||
45 | " | ||
46 | |||
47 | do_configure() { | ||
48 | ${S}/configure ${EXTRA_OECONF} | ||
49 | } | ||