summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
committerTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-multimedia
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-fpu.inc6
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch32
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch34
-rwxr-xr-xmeta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch345
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch51
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch21
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb54
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/autotools.patch32
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch25
-rw-r--r--meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb35
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb17
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch52
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch48
-rw-r--r--meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb95
-rw-r--r--meta/recipes-multimedia/flac/flac-1.3.0/0001-Fix-Makefile.am-altivec-logic.patch35
-rw-r--r--meta/recipes-multimedia/flac/flac_1.3.0.bb44
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch34
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alac-fix-nb_samples-order-case.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alsdec-check-block-length.patch61
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-atrac3dec-Check-coding-mode-against-channels.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch40
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch50
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch50
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch81
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch69
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-eamad-fix-out-of-array-accesses.patch29
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch29
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch36
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch29
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch145
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch33
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch39
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Check-init_vlc-return-codes.patch87
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch61
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch45
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-mjpegdec-check-SE.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch34
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch44
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch58
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-roqvideodec-check-dimensions-validity.patch36
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch183
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch51
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch68
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/configure-fix.patch22
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch100
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch26
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/h264_qpel_mmx.patch57
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav-9.patch9304
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav_e500mc.patch21
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/libav_e5500.patch19
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/lower-rank.diff16
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb92
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-fluendo-mp3_0.10.19.bb14
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-fluendo-mpegdemux_0.10.72.bb12
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-fluendo.inc14
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb73
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-openmax/gcc_4.6.patch18
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-openmax/ptr-array.patch46
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-openmax_0.10.1.bb35
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb50
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/configure.ac-fix-subparse-plugin.patch27
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/gst-plugins-base-tremor.patch20
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb39
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-gl/0001-conditional-gl-framebuffer-undefined-use.patch35
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb25
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0001-v4l2-fix-build-with-recent-kernels-the-v4l2_buffer-i.patch33
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0001-v4l2_calls-define-V4L2_CID_HCENTER-and-V4L2_CID_VCEN.patch45
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good-0.10.31/0407-mulawdec-fix-integer-overrun.patch47
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb44
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc58
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-ugly_0.10.19.bb29
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins.inc28
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/0001-baseparse-Fix-self-comparison-always-evaluates-to-tr.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/check_fix.patch19
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/gst-inspect-check-error.patch16
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/gstregistrybinary.c487
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer-0.10.36/gstregistrybinary.h194
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch33
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.1.bb24
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb28
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb65
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc42
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx/0001-omx-fixed-type-error-in-printf-call.patch30
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb21
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc134
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch41
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch64
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.1.bb13
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb27
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc40
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch37
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch44
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.1.bb14
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb19
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc57
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch62
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.1.bb12
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb18
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc31
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.1.bb8
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb17
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc57
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc14
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.1.bb6
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0.inc27
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch28
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.1.bb13
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb18
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer_0.10.36.bb50
-rw-r--r--meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch59
-rw-r--r--meta/recipes-multimedia/lame/lame/no-gtk1.patch20
-rw-r--r--meta/recipes-multimedia/lame/lame_3.99.5.bb30
-rw-r--r--meta/recipes-multimedia/liba52/liba52/buildcleanup.patch89
-rw-r--r--meta/recipes-multimedia/liba52/liba52_0.7.4.bb23
-rw-r--r--meta/recipes-multimedia/libav/libav.inc144
-rw-r--r--meta/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch23
-rw-r--r--meta/recipes-multimedia/libav/libav_0.8.15.bb18
-rw-r--r--meta/recipes-multimedia/libav/libav_9.16.bb13
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag/addpkgconfig.patch43
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb22
-rw-r--r--meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch70
-rw-r--r--meta/recipes-multimedia/libmad/libmad/automake-foreign.patch12
-rw-r--r--meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch33
-rw-r--r--meta/recipes-multimedia/libmad/libmad/no-force-mem.patch18
-rw-r--r--meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch14
-rw-r--r--meta/recipes-multimedia/libmad/libmad_0.15.1b.bb38
-rw-r--r--meta/recipes-multimedia/libogg/libogg_1.3.2.bb17
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil-0.9.3/configure-fix.patch58
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil-0.9.3/disable-so-versioning.patch36
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil-0.9.3/dynamicloader-linking.patch20
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil-0.9.3/makefile-docdir-fix.patch19
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil-0.9.3/parallel-make.patch18
-rw-r--r--meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb39
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.13.bb29
-rw-r--r--meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb18
-rw-r--r--meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch211
-rw-r--r--meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch49
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb33
-rw-r--r--meta/recipes-multimedia/libtheora/libtheora-1.1.1/no-docs.patch15
-rw-r--r--meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb20
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1960.patch151
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch786
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-4231.patch44
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-4232.patch15
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-4243.patch40
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-4244.patch19
-rw-r--r--meta/recipes-multimedia/libtiff/files/libtool2.patch19
-rw-r--r--meta/recipes-multimedia/libtiff/files/tiff-CVE-2012-4564.patch99
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.3.bb54
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis_1.3.4.bb25
-rw-r--r--meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch43
-rw-r--r--meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb38
-rw-r--r--meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb31
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc151
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-configure.ac-Check-only-for-libsystemd-not-libsystem.patch30
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/CVE-2014-3970.patch52
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/volatiles.04_pulse2
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio_5.0.bb14
-rw-r--r--meta/recipes-multimedia/sbc/sbc_1.2.bb16
-rw-r--r--meta/recipes-multimedia/speex/speex-fpu.inc4
-rw-r--r--meta/recipes-multimedia/speex/speex_1.2rc1.bb25
-rw-r--r--meta/recipes-multimedia/tremor/tremor-20120314/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-multimedia/tremor/tremor-20120314/tremor-arm-thumb2.patch104
-rw-r--r--meta/recipes-multimedia/tremor/tremor_20120314.bb22
-rw-r--r--meta/recipes-multimedia/x264/x264/don-t-default-to-cortex-a9-with-neon.patch20
-rw-r--r--meta/recipes-multimedia/x264/x264_git.bb55
176 files changed, 18022 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-fpu.inc b/meta/recipes-multimedia/alsa/alsa-fpu.inc
new file mode 100644
index 0000000..5040230
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-fpu.inc
@@ -0,0 +1,6 @@
1
2def get_alsa_fpu_setting(bb, d):
3 if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
4 return "--with-softfloat"
5 return ""
6
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch
new file mode 100755
index 0000000..06cdcb9
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch
@@ -0,0 +1,32 @@
1From f6b879e7cc87d83343f5004369146881d1d1e335 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@freescale.com>
3Date: Wed, 23 Jul 2014 15:09:58 +0800
4Subject: [PATCH] pcm: pcm_local.h: include <time.h> to enable CLOCK_MONOTONIC
5
6CLOCK_MONITONIC is defined in <bits/time.h>, add <time.h> before <sys/time.h>.
7
8Commit f6b879e7cc87d83343f5004369146881d1d1e335 in master branch
9
10Upstream Status: Backported
11
12Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
13Signed-off-by: Takashi Iwai <tiwai@suse.de>
14---
15 src/pcm/pcm_local.h | 1 +
16 1 file changed, 1 insertion(+)
17
18diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
19index 2206afe..80bbe59 100644
20--- a/src/pcm/pcm_local.h
21+++ b/src/pcm/pcm_local.h
22@@ -24,6 +24,7 @@
23 #include <stdlib.h>
24 #include <limits.h>
25 #include <sys/uio.h>
26+#include <time.h>
27 #include <sys/time.h>
28
29 #define _snd_mask sndrv_mask
30--
311.7.9.5
32
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
new file mode 100755
index 0000000..8be3d75
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
@@ -0,0 +1,34 @@
1From 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 Mon Sep 17 00:00:00 2001
2From: Shengjiu Wang <shengjiu.wang@freescale.com>
3Date: Mon, 14 Jul 2014 16:55:48 +0800
4Subject: [PATCH] pcm: rate: fix hw_ptr exceed the boundary
5
6For long time test case, the hw_ptr will exceed the boundary, then cause
7the avail size wrong.
8
9Commit is 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 in master branch
10
11Upstream Status: Backported
12
13Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
14Signed-off-by: Takashi Iwai <tiwai@suse.de>
15---
16 src/pcm/pcm_rate.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
20index 7f667d4..2563d82 100644
21--- a/src/pcm/pcm_rate.c
22+++ b/src/pcm/pcm_rate.c
23@@ -574,6 +574,8 @@ static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm)
24 rate->hw_ptr =
25 (slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size +
26 rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size);
27+
28+ rate->hw_ptr %= pcm->boundary;
29 }
30
31 static int snd_pcm_rate_hwsync(snd_pcm_t *pcm)
32--
331.7.9.5
34
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch
new file mode 100755
index 0000000..89363d5
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch
@@ -0,0 +1,345 @@
1From 3f179d6cc7c222dfa42fe094b7ef1e21685a05bc Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 22 Jul 2014 11:55:40 +0200
4Subject: [PATCH] pcm: route: Use get32 for multi-source route calculation
5
6The PCM route plugin can assign the destination value from average of
7multiple sources with attenuation. This requires the read of each
8channel value, sums and writes the resultant value in the requested
9format.
10
11Currently, get_labels is used for reading source values while
12put32_labels is used for writing the dest value. This is, however,
13a buggy implementation; get_labels gives the value as is only with
14endianness and signedness conversions, but put32_labels assumes that
15the value is normalized to 32bit int and it shifts down to the dest
16format. In addition, the current code lacks get_labels entries for
17the 24bit formats, as Shengjiu Wang spotted out.
18
19For fixing these bugs, this patch replaces the read with
20get32_labels and use always 64bit int for sum. This simplifies the
21code a lot and drops many lines.
22
23Commit fd84adc63e307572d05274be44c782a787087cda in master branch
24
25Upstream Status: Backported
26
27Signed-off-by: Takashi Iwai <tiwai@suse.de>
28---
29 src/pcm/pcm_route.c | 128 +++++++++-----------------------------------------
30 src/pcm/plugin_ops.h | 81 --------------------------------
31 2 files changed, 23 insertions(+), 186 deletions(-)
32
33diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
34index 2beedf6..1ed9c5f 100644
35--- a/src/pcm/pcm_route.c
36+++ b/src/pcm/pcm_route.c
37@@ -60,7 +60,7 @@ typedef struct {
38 typedef struct snd_pcm_route_ttable_dst snd_pcm_route_ttable_dst_t;
39
40 typedef struct {
41- enum {UINT32=0, UINT64=1, FLOAT=2} sum_idx;
42+ enum {UINT64, FLOAT} sum_idx;
43 unsigned int get_idx;
44 unsigned int put_idx;
45 unsigned int conv_idx;
46@@ -232,55 +232,34 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
47 const snd_pcm_route_ttable_dst_t* ttable,
48 const snd_pcm_route_params_t *params)
49 {
50-#define GETS_LABELS
51+#define GET32_LABELS
52 #define PUT32_LABELS
53 #include "plugin_ops.h"
54-#undef GETS_LABELS
55+#undef GET32_LABELS
56 #undef PUT32_LABELS
57- static void *const zero_labels[3] = {
58- &&zero_int32, &&zero_int64,
59+ static void *const zero_labels[2] = {
60+ &&zero_int64,
61 #if SND_PCM_PLUGIN_ROUTE_FLOAT
62 &&zero_float
63 #endif
64 };
65 /* sum_type att */
66- static void *const add_labels[3 * 2] = {
67- &&add_int32_noatt, &&add_int32_att,
68+ static void *const add_labels[2 * 2] = {
69 &&add_int64_noatt, &&add_int64_att,
70 #if SND_PCM_PLUGIN_ROUTE_FLOAT
71 &&add_float_noatt, &&add_float_att
72 #endif
73 };
74- /* sum_type att shift */
75- static void *const norm_labels[3 * 2 * 4] = {
76- 0,
77- &&norm_int32_8_noatt,
78- &&norm_int32_16_noatt,
79- &&norm_int32_24_noatt,
80- 0,
81- &&norm_int32_8_att,
82- &&norm_int32_16_att,
83- &&norm_int32_24_att,
84- &&norm_int64_0_noatt,
85- &&norm_int64_8_noatt,
86- &&norm_int64_16_noatt,
87- &&norm_int64_24_noatt,
88- &&norm_int64_0_att,
89- &&norm_int64_8_att,
90- &&norm_int64_16_att,
91- &&norm_int64_24_att,
92+ /* sum_type att */
93+ static void *const norm_labels[2 * 2] = {
94+ &&norm_int64_noatt,
95+ &&norm_int64_att,
96 #if SND_PCM_PLUGIN_ROUTE_FLOAT
97- &&norm_float_0,
98- &&norm_float_8,
99- &&norm_float_16,
100- &&norm_float_24,
101- &&norm_float_0,
102- &&norm_float_8,
103- &&norm_float_16,
104- &&norm_float_24,
105+ &&norm_float,
106+ &&norm_float,
107 #endif
108 };
109- void *zero, *get, *add, *norm, *put32;
110+ void *zero, *get32, *add, *norm, *put32;
111 int nsrcs = ttable->nsrcs;
112 char *dst;
113 int dst_step;
114@@ -322,9 +301,9 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
115 }
116
117 zero = zero_labels[params->sum_idx];
118- get = gets_labels[params->get_idx];
119+ get32 = get32_labels[params->get_idx];
120 add = add_labels[params->sum_idx * 2 + ttable->att];
121- norm = norm_labels[params->sum_idx * 8 + ttable->att * 4 + 4 - params->src_size];
122+ norm = norm_labels[params->sum_idx * 2 + ttable->att];
123 put32 = put32_labels[params->put_idx];
124 dst = snd_pcm_channel_area_addr(dst_area, dst_offset);
125 dst_step = snd_pcm_channel_area_step(dst_area);
126@@ -335,9 +314,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
127
128 /* Zero sum */
129 goto *zero;
130- zero_int32:
131- sum.as_sint32 = 0;
132- goto zero_end;
133 zero_int64:
134 sum.as_sint64 = 0;
135 goto zero_end;
136@@ -351,21 +327,14 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
137 const char *src = srcs[srcidx];
138
139 /* Get sample */
140- goto *get;
141-#define GETS_END after_get
142+ goto *get32;
143+#define GET32_END after_get
144 #include "plugin_ops.h"
145-#undef GETS_END
146+#undef GET32_END
147 after_get:
148
149 /* Sum */
150 goto *add;
151- add_int32_att:
152- sum.as_sint32 += sample * ttp->as_int;
153- goto after_sum;
154- add_int32_noatt:
155- if (ttp->as_int)
156- sum.as_sint32 += sample;
157- goto after_sum;
158 add_int64_att:
159 sum.as_sint64 += (int64_t) sample * ttp->as_int;
160 goto after_sum;
161@@ -389,48 +358,10 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
162
163 /* Normalization */
164 goto *norm;
165- norm_int32_8_att:
166- sum.as_sint64 = sum.as_sint32;
167- norm_int64_8_att:
168- sum.as_sint64 <<= 8;
169- norm_int64_0_att:
170- div(sum.as_sint64);
171- goto norm_int;
172-
173- norm_int32_16_att:
174- sum.as_sint64 = sum.as_sint32;
175- norm_int64_16_att:
176- sum.as_sint64 <<= 16;
177+ norm_int64_att:
178 div(sum.as_sint64);
179- goto norm_int;
180-
181- norm_int32_24_att:
182- sum.as_sint64 = sum.as_sint32;
183- norm_int64_24_att:
184- sum.as_sint64 <<= 24;
185- div(sum.as_sint64);
186- goto norm_int;
187-
188- norm_int32_8_noatt:
189- sum.as_sint64 = sum.as_sint32;
190- norm_int64_8_noatt:
191- sum.as_sint64 <<= 8;
192- goto norm_int;
193-
194- norm_int32_16_noatt:
195- sum.as_sint64 = sum.as_sint32;
196- norm_int64_16_noatt:
197- sum.as_sint64 <<= 16;
198- goto norm_int;
199-
200- norm_int32_24_noatt:
201- sum.as_sint64 = sum.as_sint32;
202- norm_int64_24_noatt:
203- sum.as_sint64 <<= 24;
204- goto norm_int;
205-
206- norm_int64_0_noatt:
207- norm_int:
208+ /* fallthru */
209+ norm_int64_noatt:
210 if (sum.as_sint64 > (int64_t)0x7fffffff)
211 sample = 0x7fffffff; /* maximum positive value */
212 else if (sum.as_sint64 < -(int64_t)0x80000000)
213@@ -440,16 +371,6 @@ static void snd_pcm_route_convert1_many(const snd_pcm_channel_area_t *dst_area,
214 goto after_norm;
215
216 #if SND_PCM_PLUGIN_ROUTE_FLOAT
217- norm_float_8:
218- sum.as_float *= 1 << 8;
219- goto norm_float;
220- norm_float_16:
221- sum.as_float *= 1 << 16;
222- goto norm_float;
223- norm_float_24:
224- sum.as_float *= 1 << 24;
225- goto norm_float;
226- norm_float_0:
227 norm_float:
228 sum.as_float = rint(sum.as_float);
229 if (sum.as_float > (int64_t)0x7fffffff)
230@@ -644,7 +565,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
231 return err;
232 route->params.use_getput = snd_pcm_format_physical_width(src_format) == 24 ||
233 snd_pcm_format_physical_width(dst_format) == 24;
234- route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S16);
235+ route->params.get_idx = snd_pcm_linear_get32_index(src_format, SND_PCM_FORMAT_S32);
236 route->params.put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, dst_format);
237 route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format);
238 route->params.src_size = snd_pcm_format_width(src_format) / 8;
239@@ -652,10 +573,7 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
240 #if SND_PCM_PLUGIN_ROUTE_FLOAT
241 route->params.sum_idx = FLOAT;
242 #else
243- if (snd_pcm_format_width(src_format) == 32)
244- route->params.sum_idx = UINT64;
245- else
246- route->params.sum_idx = UINT32;
247+ route->params.sum_idx = UINT64;
248 #endif
249 return 0;
250 }
251diff --git a/src/pcm/plugin_ops.h b/src/pcm/plugin_ops.h
252index 21535c9..eb8c2c4 100644
253--- a/src/pcm/plugin_ops.h
254+++ b/src/pcm/plugin_ops.h
255@@ -668,87 +668,6 @@ getu_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GETU_END;
256 }
257 #endif
258
259-#ifdef GETS_LABELS
260-/* width endswap sign_toggle */
261-static void *const gets_labels[4 * 2 * 2] = {
262- &&gets_1_1, /* 8h -> 8h */
263- &&gets_1_9, /* 8h ^> 8h */
264- &&gets_1_1, /* 8s -> 8h */
265- &&gets_1_9, /* 8s ^> 8h */
266- &&gets_12_12, /* 16h -> 16h */
267- &&gets_12_92, /* 16h ^> 16h */
268- &&gets_12_21, /* 16s -> 16h */
269- &&gets_12_A1, /* 16s ^> 16h */
270- &&gets_0123_0123, /* 24h -> 24h */
271- &&gets_0123_0923, /* 24h ^> 24h */
272- &&gets_1230_0321, /* 24s -> 24h */
273- &&gets_1230_0B21, /* 24s ^> 24h */
274- &&gets_1234_1234, /* 32h -> 32h */
275- &&gets_1234_9234, /* 32h ^> 32h */
276- &&gets_1234_4321, /* 32s -> 32h */
277- &&gets_1234_C321, /* 32s ^> 32h */
278-};
279-#endif
280-
281-#ifdef GETS_END
282-while (0) {
283-gets_1_1: sample = as_s8c(src); goto GETS_END;
284-gets_1_9: sample = (int8_t)(as_s8c(src) ^ 0x80); goto GETS_END;
285-gets_12_12: sample = as_s16c(src); goto GETS_END;
286-gets_12_92: sample = (int16_t)(as_s16c(src) ^ 0x8000); goto GETS_END;
287-gets_12_21: sample = (int16_t)bswap_16(as_s16c(src)); goto GETS_END;
288-gets_12_A1: sample = (int16_t)bswap_16(as_s16c(src) ^ 0x80); goto GETS_END;
289-gets_0123_0123: sample = sx24((int32_t)(as_s32c(src) << 8) >> 8); goto GETS_END;
290-gets_0123_0923: sample = sx24((int32_t)((as_s32c(src) ^ 0x800000) << 8) >> 8); goto GETS_END;
291-gets_1230_0321: sample = sx24((int32_t)(bswap_32(as_s32c(src)) << 8) >> 8); goto GETS_END;
292-gets_1230_0B21: sample = sx24((int32_t)(bswap_32(as_s32c(src) ^ 0x8000) << 8) >> 8); goto GETS_END;
293-gets_1234_1234: sample = as_s32c(src); goto GETS_END;
294-gets_1234_9234: sample = (int32_t)(as_s32c(src) ^ 0x80000000); goto GETS_END;
295-gets_1234_4321: sample = (int32_t)bswap_32(as_s32c(src)); goto GETS_END;
296-gets_1234_C321: sample = (int32_t)bswap_32(as_s32c(src) ^ 0x80); goto GETS_END;
297-}
298-#endif
299-
300-#ifdef PUT_LABELS
301-/* width endswap sign_toggle */
302-static void *const put_labels[4 * 2 * 2] = {
303- &&put_1_1, /* 8h -> 8h */
304- &&put_1_9, /* 8h ^> 8h */
305- &&put_1_1, /* 8h -> 8s */
306- &&put_1_9, /* 8h ^> 8s */
307- &&put_12_12, /* 16h -> 16h */
308- &&put_12_92, /* 16h ^> 16h */
309- &&put_12_21, /* 16h -> 16s */
310- &&put_12_29, /* 16h ^> 16s */
311- &&put_0123_0123, /* 24h -> 24h */
312- &&put_0123_0923, /* 24h ^> 24h */
313- &&put_0123_3210, /* 24h -> 24s */
314- &&put_0123_3290, /* 24h ^> 24s */
315- &&put_1234_1234, /* 32h -> 32h */
316- &&put_1234_9234, /* 32h ^> 32h */
317- &&put_1234_4321, /* 32h -> 32s */
318- &&put_1234_4329, /* 32h ^> 32s */
319-};
320-#endif
321-
322-#ifdef PUT_END
323-put_1_1: as_s8(dst) = sample; goto PUT_END;
324-put_1_9: as_u8(dst) = sample ^ 0x80; goto PUT_END;
325-put_12_12: as_s16(dst) = sample; goto PUT_END;
326-put_12_92: as_u16(dst) = sample ^ 0x8000; goto PUT_END;
327-put_12_21: as_s16(dst) = bswap_16(sample); goto PUT_END;
328-put_12_29: as_u16(dst) = bswap_16(sample) ^ 0x80; goto PUT_END;
329-/* this always writes the unused byte in 24-bit formats as 0x00 */
330-put_0123_0123: as_s32(dst) = sx24(sample & 0x00ffffff); goto PUT_END;
331-put_0123_0923: as_u32(dst) = sx24((sample & 0x00ffffff) ^ 0x800000); goto PUT_END;
332-put_0123_3210: as_s32(dst) = sx24s(bswap_32(sample) & 0xffffff00); goto PUT_END;
333-put_0123_3290: as_u32(dst) = sx24s((bswap_32(sample) & 0xffffff00) ^ 0x8000); goto PUT_END;
334-put_1234_1234: as_s32(dst) = sample; goto PUT_END;
335-put_1234_9234: as_u32(dst) = sample ^ 0x80000000; goto PUT_END;
336-put_1234_4321: as_s32(dst) = bswap_32(sample); goto PUT_END;
337-put_1234_4329: as_u32(dst) = bswap_32(sample) ^ 0x80; goto PUT_END;
338-#endif
339-
340 #ifdef PUT32F_LABELS
341 /* type (0 = float, 1 = float64), endswap */
342 static void *const put32float_labels[2 * 2] = {
343--
3441.7.9.5
345
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
new file mode 100644
index 0000000..75a6eb8
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
@@ -0,0 +1,51 @@
1From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001
2From: "Hong H. Pham" <hong.pham@windriver.com>
3Date: Fri, 29 Aug 2014 17:13:55 +0300
4Subject: [PATCH] Check if wordexp function is supported
5
6eglibc could be configured to build without wordexp, so it is not enough
7to check if wordexp.h exists (the header file could be installed, but it's
8possible that the wordexp() function is not supported). An additional
9check if wordexp() is supported by the system C library is needed.
10
11Upstream-Status: Inappropriate [configuration]
12
13Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15---
16 configure.ac | 5 ++++-
17 src/userfile.c | 2 +-
18 2 files changed, 5 insertions(+), 2 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
21index b8353a0..773b72f 100644
22--- a/configure.ac
23+++ b/configure.ac
24@@ -311,7 +311,10 @@ fi
25 AC_SUBST(ALSA_DEPLIBS)
26
27 dnl Check for headers
28-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
29+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h],
30+ dnl Make sure wordexp is supported by the C library
31+ AC_CHECK_FUNCS([wordexp])
32+)
33
34 dnl Check for resmgr support...
35 AC_MSG_CHECKING(for resmgr support)
36diff --git a/src/userfile.c b/src/userfile.c
37index 3a73836..b8ce809 100644
38--- a/src/userfile.c
39+++ b/src/userfile.c
40@@ -32,7 +32,7 @@
41 * stores the first matchine one. The returned string is strdup'ed.
42 */
43
44-#ifdef HAVE_WORDEXP_H
45+#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP))
46 #include <wordexp.h>
47 #include <assert.h>
48 int snd_user_file(const char *file, char **result)
49--
501.9.1
51
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch b/meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch
new file mode 100644
index 0000000..32b84b7
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/fix-tstamp-declaration.patch
@@ -0,0 +1,21 @@
1# Author: Michael Lauer <mickey@vanille-media.de>
2# Date: Thu Jan 18 00:27:21 2007 +0000
3# alsa-lib: fix "error: field 'tstamp' has incomplete type" when including alsa headers with strict compilation options
4#
5# Acquired from OpenEmbedded
6
7Upstream-Status: Pending
8
9Index: alsa-lib-1.0.13/include/global.h
10===================================================================
11--- alsa-lib-1.0.13.orig/include/global.h
12+++ alsa-lib-1.0.13/include/global.h
13@@ -29,6 +29,8 @@
14 #define __ALSA_GLOBAL_H_
15
16 /* for timeval and timespec */
17+#define __need_timeval
18+#define __need_timespec
19 #include <time.h>
20
21 #ifdef __cplusplus
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb
new file mode 100644
index 0000000..9a4aab4
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb
@@ -0,0 +1,54 @@
1SUMMARY = "ALSA sound library"
2HOMEPAGE = "http://www.alsa-project.org"
3BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
4SECTION = "libs/multimedia"
5LICENSE = "LGPLv2.1 & GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
7 file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
8
9BBCLASSEXTEND = "native nativesdk"
10
11# configure.in sets -D__arm__ on the command line for any arm system
12# (not just those with the ARM instruction set), this should be removed,
13# (or replaced by a permitted #define).
14#FIXME: remove the following
15ARM_INSTRUCTION_SET = "arm"
16
17SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
18 file://Check-if-wordexp-function-is-supported.patch \
19 file://fix-tstamp-declaration.patch \
20 file://0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch \
21 file://0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch \
22 file://0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch \
23"
24SRC_URI[md5sum] = "c9e21b88a2b3e6e12ea7ba0f3b271fc3"
25SRC_URI[sha256sum] = "3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d"
26
27inherit autotools pkgconfig
28
29require alsa-fpu.inc
30EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
31
32EXTRA_OECONF = "--disable-python"
33
34EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
35
36PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
37FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
38FILES_${PN}-dbg += "${libdir}/${BPN}/smixer/.debug"
39FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
40FILES_libasound = "${libdir}/libasound.so.*"
41FILES_alsa-server = "${bindir}/*"
42FILES_alsa-conf = "${datadir}/alsa/"
43FILES_alsa-conf-base = "\
44${datadir}/alsa/alsa.conf \
45${datadir}/alsa/cards/aliases.conf \
46${datadir}/alsa/pcm/default.conf \
47${datadir}/alsa/pcm/dmix.conf \
48${datadir}/alsa/pcm/dsnoop.conf"
49
50RDEPENDS_libasound = "alsa-conf-base alsa-conf"
51# upgrade path
52RPROVIDES_${PN}-dev = "alsa-dev"
53RREPLACES_${PN}-dev = "alsa-dev"
54RCONFLICTS_${PN}-dev = "alsa-dev"
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
new file mode 100644
index 0000000..5aec84c
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
@@ -0,0 +1,32 @@
1Add parameters to autoreconf to support cross compile.
2Remove some sub-components which needs further recipe support.
3
4Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
5
6Upstream-Status: Inappropriate [configuration]
7
8diff -ruN alsa-tools-1.0.24.1-orig//ld10k1/gitcompile alsa-tools-1.0.24.1/ld10k1/gitcompile
9--- alsa-tools-1.0.24.1-orig//ld10k1/gitcompile 2011-07-06 11:27:40.227665002 +0800
10+++ alsa-tools-1.0.24.1/ld10k1/gitcompile 2011-07-14 13:26:18.017665004 +0800
11@@ -1,6 +1,6 @@
12 #!/bin/bash
13
14-autoreconf -fi || exit 1
15+autoreconf $ACLOCAL_FLAGS -fi || exit 1
16 export CFLAGS='-O2 -Wall -pipe -g'
17 echo "CFLAGS=$CFLAGS"
18 echo "./configure $@"
19diff -ruN alsa-tools-1.0.24.1-orig//Makefile alsa-tools-1.0.24.1/Makefile
20--- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800
21+++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800
22@@ -1,8 +1,8 @@
23 VERSION = 1.0.27
24 TOP = .
25-SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
26+SUBDIRS = as10k1 envy24control \
27 mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
28- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \
29+ us428control usx2yloader vxloader echomixer \
30 hwmixvolume hdajackretask hda-verb
31
32 all:
diff --git a/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
new file mode 100644
index 0000000..2665726
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
@@ -0,0 +1,25 @@
1Remove some sub-components which need gtk+.
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Rogerio Nunes <ronunes@gmail.com>
6Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
7
8diff --git a/Makefile b/Makefile
9index 2457a1c..72346d9 100644
10--- a/Makefile
11+++ b/Makefile
12@@ -1,9 +1,9 @@
13 VERSION = 1.0.27
14 TOP = .
15-SUBDIRS = as10k1 envy24control \
16- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
17- us428control usx2yloader vxloader echomixer \
18- hwmixvolume hdajackretask hda-verb
19+SUBDIRS = as10k1 \
20+ mixartloader pcxhrloader sb16_csp seq sscape_ctl \
21+ us428control usx2yloader vxloader \
22+ hwmixvolume hda-verb
23
24 all:
25 @for i in $(SUBDIRS); do \
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb
new file mode 100644
index 0000000..4b9509e
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb
@@ -0,0 +1,35 @@
1SUMMARY = "Advanced tools for certain ALSA sound card drivers"
2HOMEPAGE = "http://www.alsa-project.org"
3BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
4SECTION = "console/utils"
5LICENSE = "GPLv2 & LGPLv2+"
6DEPENDS = "alsa-lib ncurses"
7
8LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
10
11SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
12 file://autotools.patch \
13 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
14 'file://makefile_no_gtk.patch', d)}"
15
16SRC_URI[md5sum] = "e6c929175d8ee729c06d49b51439bad6"
17SRC_URI[sha256sum] = "76e59711c6d0f39cbddce83ce1ed8da00bad112fee021f94fa990d8685cc3761"
18
19inherit autotools-brokensep pkgconfig
20
21EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
22
23PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
24PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
25
26# configure.ac/.in doesn't exist so force copy
27AUTOTOOLS_COPYACLOCAL = "1"
28
29do_compile_prepend () {
30 #Automake dir is not correctly detected in cross compilation case
31 export AUTOMAKE_DIR="$(automake --print-libdir)"
32 export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/"
33}
34
35FILES_${PN} += "${datadir}/ld10k1"
diff --git a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb
new file mode 100644
index 0000000..968c81e
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb
@@ -0,0 +1,17 @@
1require alsa-utils_${PV}.bb
2
3SUMMARY = "Shell script that creates ALSA configuration files"
4
5FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:"
6
7PACKAGES = "${PN}"
8RDEPENDS_${PN} += "bash"
9
10FILES_${PN} = "${sbindir}/alsaconf"
11
12S = "${WORKDIR}/alsa-utils-${PV}"
13
14do_install() {
15 install -d ${D}${sbindir}
16 install -m 0755 ${S}/alsaconf/alsaconf ${D}${sbindir}/
17}
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
new file mode 100644
index 0000000..e99dd51
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
@@ -0,0 +1,52 @@
1From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 29 Aug 2014 18:58:56 +0300
4Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
5 asound.state is missing
6
7This avoids an error on bootup
8
9Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
10
11Upstream-Status: Pending
12
13Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15---
16 alsactl/Makefile.am | 7 ++++---
17 alsactl/alsa-restore.service.in | 1 +
18 2 files changed, 5 insertions(+), 3 deletions(-)
19
20diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
21index 47f06e9..b728c06 100644
22--- a/alsactl/Makefile.am
23+++ b/alsactl/Makefile.am
24@@ -43,9 +43,10 @@ install-data-hook:
25 endif
26
27 edit = \
28- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
29- -e 's,@mydatadir\@,$(mydatadir),g' \
30- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
31+ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \
32+ -e 's,@sbindir\@,$(sbindir),g' \
33+ -e 's,@mydatadir\@,$(mydatadir),g' \
34+ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
35 < $< > $@ || rm $@
36
37 alsa-state.service: alsa-state.service.in
38diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
39index 245a439..b017854 100644
40--- a/alsactl/alsa-restore.service.in
41+++ b/alsactl/alsa-restore.service.in
42@@ -10,6 +10,7 @@ DefaultDependencies=no
43 After=alsa-state.service
44 Before=shutdown.target
45 Conflicts=shutdown.target
46+ConditionPathExists=@localstatedir@/lib/alsa/asound.state
47
48 [Service]
49 Type=oneshot
50--
511.9.1
52
diff --git a/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
new file mode 100644
index 0000000..5df004a
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
@@ -0,0 +1,48 @@
1Upstream-Status: Pending
2
3aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming
4via CTRL-C. Fixed the issue by reverting buggy patches and
5properly handling 'in_aborting' flag in appropriate functions.
6
7Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
8Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
9
10--- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530
11+++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530
12@@ -392,14 +392,22 @@
13 putchar('\n');
14 if (!quiet_mode)
15 fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig));
16- if (handle)
17+ if (stream == SND_PCM_STREAM_CAPTURE) {
18+ if (fmt_rec_table[file_type].end) {
19+ fmt_rec_table[file_type].end(fd);
20+ fd = -1;
21+ }
22+ stream = -1;
23+ }
24+ if (fd > 1) {
25+ close(fd);
26+ fd = -1;
27+ }
28+ if (handle && sig != SIGABRT) {
29 snd_pcm_abort(handle);
30- if (sig == SIGABRT) {
31- /* do not call snd_pcm_close() and abort immediately */
32 handle = NULL;
33- prg_exit(EXIT_FAILURE);
34 }
35- signal(sig, signal_handler);
36+ prg_exit(EXIT_FAILURE);
37 }
38
39 /* call on SIGUSR1 signal. */
40@@ -2096,7 +2104,7 @@
41 ssize_t result = count, r;
42 size_t size;
43
44- while (count > 0) {
45+ while (count > 0 && !in_aborting) {
46 size = count;
47 if (size > chunk_bytes - buffer_pos)
48 size = chunk_bytes - buffer_pos;
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
new file mode 100644
index 0000000..5f35d76
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb
@@ -0,0 +1,95 @@
1SUMMARY = "ALSA sound utilities"
2HOMEPAGE = "http://www.alsa-project.org"
3BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
4SECTION = "console/utils"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7 file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
8DEPENDS = "alsa-lib ncurses libsamplerate0 udev"
9
10PACKAGECONFIG ??= "udev"
11PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
12PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
13
14SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
15 file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
16 file://alsa-utils-aplay-interrupt-signal-handling.patch \
17 "
18
19SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211"
20SRC_URI[sha256sum] = "f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc"
21
22# lazy hack. needs proper fixing in gettext.m4, see
23# http://bugs.openembedded.org/show_bug.cgi?id=2348
24# please close bug and remove this comment when properly fixed
25#
26EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
27
28inherit autotools-brokensep gettext pkgconfig
29
30# This are all packages that we need to make. Also, the now empty alsa-utils
31# ipk depends on them.
32
33ALSA_UTILS_PKGS = "\
34 alsa-utils-alsamixer \
35 alsa-utils-midi \
36 alsa-utils-aplay \
37 alsa-utils-amixer \
38 alsa-utils-aconnect \
39 alsa-utils-iecset \
40 alsa-utils-speakertest \
41 alsa-utils-aseqnet \
42 alsa-utils-aseqdump \
43 alsa-utils-alsactl \
44 alsa-utils-alsaloop \
45 alsa-utils-alsaucm \
46 "
47
48PACKAGES += "${ALSA_UTILS_PKGS}"
49RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
50
51FILES_${PN} = ""
52FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
53FILES_alsa-utils-amixer = "${bindir}/amixer"
54FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
55FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
56FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
57FILES_alsa-utils-aconnect = "${bindir}/aconnect"
58FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
59FILES_alsa-utils-iecset = "${bindir}/iecset"
60FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
61FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
62FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
63FILES_alsa-utils-alsaucm = "${bindir}/alsaucm"
64
65
66SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
67SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
68SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
69SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
70SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
71SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
72SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
73SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
74SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
75SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
76SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
77SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
78
79RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
80
81ALLOW_EMPTY_alsa-utils = "1"
82
83do_install() {
84 autotools_do_install
85
86 # We don't ship this here because it requires a dependency on bash.
87 # See alsa-utils-alsaconf_${PV}.bb
88 rm ${D}${sbindir}/alsaconf
89
90 if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
91 # This is where alsa-utils will install its rules if we don't tell it anything else.
92 rm -rf ${D}/lib/udev
93 rmdir --ignore-fail-on-non-empty ${D}/lib
94 fi
95}
diff --git a/meta/recipes-multimedia/flac/flac-1.3.0/0001-Fix-Makefile.am-altivec-logic.patch b/meta/recipes-multimedia/flac/flac-1.3.0/0001-Fix-Makefile.am-altivec-logic.patch
new file mode 100644
index 0000000..d086cc9
--- /dev/null
+++ b/meta/recipes-multimedia/flac/flac-1.3.0/0001-Fix-Makefile.am-altivec-logic.patch
@@ -0,0 +1,35 @@
1From 1b3597cdc7b5e604ea37db29b2a65aab91e263e6 Mon Sep 17 00:00:00 2001
2From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3Date: Wed, 4 Dec 2013 13:31:28 -0300
4Subject: [PATCH] Fix Makefile.am altivec logic
5
6Upstream-Status: Backport
7
8Besides SPE (FSL e500v? cores) there are other powerpc processors
9that don't support altivec instructions so only enable them when it's
10100% sure that the target has it.
11
12Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
13Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15---
16 src/libFLAC/Makefile.am | 3 +--
17 1 file changed, 1 insertion(+), 2 deletions(-)
18
19diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am
20index 247e33c..258de40 100644
21--- a/src/libFLAC/Makefile.am
22+++ b/src/libFLAC/Makefile.am
23@@ -47,8 +47,7 @@ CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM
24 else
25 # Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
26 CPUCFLAGS =
27-if FLaC__CPU_PPC_SPE
28-else
29+if FLaC__USE_ALTIVEC
30 CPUCFLAGS += -maltivec -mabi=altivec
31 endif
32 #@@@ PPC optimizations temporarily disabled
33--
341.8.3.2
35
diff --git a/meta/recipes-multimedia/flac/flac_1.3.0.bb b/meta/recipes-multimedia/flac/flac_1.3.0.bb
new file mode 100644
index 0000000..fdf38e9
--- /dev/null
+++ b/meta/recipes-multimedia/flac/flac_1.3.0.bb
@@ -0,0 +1,44 @@
1SUMMARY = "Free Lossless Audio Codec"
2DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format."
3HOMEPAGE = "https://xiph.org/flac/"
4BUGTRACKER = "http://sourceforge.net/p/flac/bugs/"
5SECTION = "libs"
6LICENSE = "GFDL-1.2 & GPLv2+ & LGPLv2.1+ & BSD"
7LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
8 file://src/Makefile.am;beginline=1;endline=17;md5=59575c1aa8f5f70d9361b776c2e2bdb5 \
9 file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://src/flac/main.c;beginline=1;endline=18;md5=d36a16abc38d5ffd346ac4ba1be1932b \
11 file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \
12 file://src/plugin_common/all.h;beginline=1;endline=18;md5=e33e281151e7f40db2d3d170d9b0c1bb \
13 file://COPYING.Xiph;md5=755582d124a03e3001afea59fc02b61b \
14 file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48"
15DEPENDS = "libogg"
16
17SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
18 file://0001-Fix-Makefile.am-altivec-logic.patch \
19 "
20
21SRC_URI[md5sum] = "13b5c214cee8373464d3d65dee362cdd"
22SRC_URI[sha256sum] = "fa2d64aac1f77e31dfbb270aeb08f5b32e27036a52ad15e69a77e309528010dc"
23
24inherit autotools-brokensep gettext
25
26EXTRA_OECONF = "--disable-oggtest \
27 --with-ogg-libraries=${STAGING_LIBDIR} \
28 --with-ogg-includes=${STAGING_INCDIR} \
29 --disable-xmms-plugin \
30 --without-libiconv-prefix \
31 ac_cv_prog_NASM="" \
32 "
33
34EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}"
35EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "core2", " --enable-sse", "", d)}"
36EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "corei7", " --enable-sse", "", d)}"
37
38PACKAGES += "libflac libflac++ liboggflac liboggflac++"
39FILES_${PN} = "${bindir}/*"
40FILES_libflac = "${libdir}/libFLAC.so.*"
41FILES_libflac++ = "${libdir}/libFLAC++.so.*"
42FILES_liboggflac = "${libdir}/libOggFLAC.so.*"
43FILES_liboggflac++ = "${libdir}/libOggFLAC++.so.*"
44
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
new file mode 100644
index 0000000..7da0e14
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-aacdec-check-channel-count.patch
@@ -0,0 +1,34 @@
1gst-ffmpeg: aacdec: check channel count
2
3Prevent out of array accesses
4
5Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
6Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)
8
9Upstream-Status: Backport
10
11Signed-off-by: Yue Tao <yue.tao@windriver.com>
12---
13 libavcodec/aacdec.c | 5 +++++
14 1 files changed, 5 insertions(+), 0 deletions(-)
15
16diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
17index 239153a..6c17c33 100644
18--- a/gst-libs/ext/libav/libavcodec/aacdec.c
19+++ b/gst-libs/ext/libav/libavcodec/aacdec.c
20@@ -914,6 +914,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
21 }
22 }
23
24+ if (avctx->channels > MAX_CHANNELS) {
25+ av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
26+ return AVERROR_INVALIDDATA;
27+ }
28+
29 AAC_INIT_VLC_STATIC( 0, 304);
30 AAC_INIT_VLC_STATIC( 1, 270);
31 AAC_INIT_VLC_STATIC( 2, 550);
32--
331.7.5.4
34
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alac-fix-nb_samples-order-case.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alac-fix-nb_samples-order-case.patch
new file mode 100644
index 0000000..10ce0f3
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alac-fix-nb_samples-order-case.patch
@@ -0,0 +1,30 @@
1From e0884eadf6a15e93142131b695f48776f9a0ac31 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Sat, 10 Nov 2012 17:14:04 +0100
4Subject: [PATCH] alac: fix nb_samples < order case
5
6Upstream-Status: Backport
7
8Commit e0884eadf6a15e93142131b695f48776f9a0ac31 release/1.0
9
10Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
11Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12(cherry picked from commit fd4f4923cce6a2cbf4f48640b4ac706e614a1594)
13---
14 libavcodec/alac.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/libavcodec/alac.c b/libavcodec/alac.c
18index 9cd1737..e8e844a 100644
19--- a/gst-libs/ext/libav/libavcodec/alac.c
20+++ b/gst-libs/ext/libav/libavcodec/alac.c
21@@ -278,7 +278,7 @@ static void predictor_decompress_fir_ada
22
23 /* read warm-up samples */
24 if (predictor_coef_num > 0)
25- for (i = 0; i < predictor_coef_num; i++) {
26+ for (i = 0; i < predictor_coef_num && i < output_size; i++) {
27 int32_t val;
28
29 val = buffer_out[i] + error_buffer[i+1];
30--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alsdec-check-block-length.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alsdec-check-block-length.patch
new file mode 100644
index 0000000..73980f4
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-alsdec-check-block-length.patch
@@ -0,0 +1,61 @@
1From 6df0d3e2916c223dbe4262bf1b876dff1cb3f980 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Wed, 12 Dec 2012 12:28:45 +0100
4Subject: [PATCH] alsdec: check block length
5
6Upstream-Status: Backport
7
8Commit 6df0d3e2916c223dbe4262bf1b876dff1cb3f980 release/1.0
9
10Fix writing over the end
11
12Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
13Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14(cherry picked from commit 0ceca269b66ec12a23bf0907bd2c220513cdbf16)
15
16Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
17---
18 libavcodec/alsdec.c | 10 ++++++++--
19 1 file changed, 8 insertions(+), 2 deletions(-)
20
21diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
22index 46dd0b4..1095b01 100644
23--- a/gst-libs/ext/libav/libavcodec/alsdec.c
24+++ b/gst-libs/ext/libav/libavcodec/alsdec.c
25@@ -552,12 +552,15 @@ static void get_block_sizes(ALSDecContext *ctx, unsigned int *div_blocks,
26
27 /** Read the block data for a constant block
28 */
29-static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
30+static int read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
31 {
32 ALSSpecificConfig *sconf = &ctx->sconf;
33 AVCodecContext *avctx = ctx->avctx;
34 GetBitContext *gb = &ctx->gb;
35
36+ if (bd->block_length <= 0)
37+ return -1;
38+
39 *bd->raw_samples = 0;
40 *bd->const_block = get_bits1(gb); // 1 = constant value, 0 = zero block (silence)
41 bd->js_blocks = get_bits1(gb);
42@@ -572,6 +575,8 @@ static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
43
44 // ensure constant block decoding by reusing this field
45 *bd->const_block = 1;
46+
47+ return 0;
48 }
49
50
51@@ -971,7 +976,8 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
52 if (read_var_block_data(ctx, bd))
53 return -1;
54 } else {
55- read_const_block_data(ctx, bd);
56+ if (read_const_block_data(ctx, bd) < 0)
57+ return -1;
58 }
59
60 return 0;
61--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-atrac3dec-Check-coding-mode-against-channels.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-atrac3dec-Check-coding-mode-against-channels.patch
new file mode 100644
index 0000000..42cb5f4
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-atrac3dec-Check-coding-mode-against-channels.patch
@@ -0,0 +1,37 @@
1From 2502914c5f8eb77659d7c0868396862557a63245 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Fri, 9 Nov 2012 13:26:20 +0100
4Subject: [PATCH] atrac3dec: Check coding mode against channels.
5
6Upstream-Status: Backport
7
8Commit 2502914c5f8eb77659d7c0868396862557a63245 release/1.0
9
10Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
11Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12(cherry picked from commit 13451f5520ce6b0afde861b2285dda659f8d4fb4)
13
14Conflicts:
15
16 libavcodec/atrac3.c
17---
18 libavcodec/atrac3.c | 5 +++++
19 1 file changed, 5 insertions(+)
20
21diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
22index 7d076be..1da4c78 100644
23--- a/gst-libs/ext/libav/libavcodec/atrac3.c
24+++ b/gst-libs/ext/libav/libavcodec/atrac3.c
25@@ -955,6 +955,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
26 }
27 /* Check the extradata. */
28
29+ if (q->codingMode == JOINT_STEREO && avctx->channels < 2) {
30+ av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n");
31+ return AVERROR_INVALIDDATA;
32+ }
33+
34 if (q->atrac3version != 4) {
35 av_log(avctx,AV_LOG_ERROR,"Version %d != 4.\n",q->atrac3version);
36 return AVERROR_INVALIDDATA;
37--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
new file mode 100644
index 0000000..31fa51a
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch
@@ -0,0 +1,40 @@
1From a99aff4e4bbef8e64b51f267cd1769214e1b4e80 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Fri, 30 Aug 2013 23:40:47 +0200
4Subject: [PATCH] avcodec/dsputil: fix signedness in sizeof() comparissions
5
6Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7(cherry picked from commit 454a11a1c9c686c78aa97954306fb63453299760)
8
9Upstream-Status: Backport
10
11Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12---
13 libavcodec/dsputil.c | 4 ++--
14 1 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
17index 53dc2eb..6264832 100644
18--- a/gst-libs/ext/libav/libavcodec/dsputil.c
19+++ b/gst-libs/ext/libav/libavcodec/dsputil.c
20@@ -1912,7 +1912,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
21
22 static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
23 long i;
24- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
25+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
26 long a = *(long*)(src+i);
27 long b = *(long*)(dst+i);
28 *(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
29@@ -1937,7 +1937,7 @@ static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
30 }
31 }else
32 #endif
33- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
34+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
35 long a = *(long*)(src1+i);
36 long b = *(long*)(src2+i);
37 *(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
38--
391.7.5.4
40
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch
new file mode 100644
index 0000000..b0a3fb1
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch
@@ -0,0 +1,50 @@
1From 573d5fdedae72bf59d8c0b0766fdee171063d36f Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Sun, 16 Feb 2014 23:08:52 +0100
4Subject: [PATCH] avcodec/msrle: use av_image_get_linesize() to calculate the
5 linesize
6
7Upstream-Status: Backport
8
9Commit 573d5fdedae72bf59d8c0b0766fdee171063d36f release/0.9
10
11Fixes out of array access
12Fixes: 14a74a0a2dc67ede543f0e35d834fbbe-asan_heap-oob_49572c_556_cov_215466444_44_001_engine_room.mov
13Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
14Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
15(cherry picked from commit c919e1ca2ecfc47d796382973ba0e48b8f6f92a2)
16
17Conflicts:
18
19 libavcodec/msrle.c
20(cherry picked from commit bc1c8ec5e65098fd2ccd8456f667151dfc9cda42)
21
22Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
23---
24 libavcodec/msrle.c | 3 ++-
25 1 files changed, 2 insertions(+), 1 deletions(-)
26
27diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
28index 30159bb..c39ae7b 100644
29--- a/gst-libs/ext/libav/libavcodec/msrle.c
30+++ b/gst-libs/ext/libav/libavcodec/msrle.c
31@@ -35,6 +35,7 @@
32 #include "avcodec.h"
33 #include "dsputil.h"
34 #include "msrledec.h"
35+#include "libavutil/imgutils.h"
36
37 typedef struct MsrleContext {
38 AVCodecContext *avctx;
39@@ -107,7 +108,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
40
41 /* FIXME how to correctly detect RLE ??? */
42 if (avctx->height * istride == avpkt->size) { /* assume uncompressed */
43- int linesize = avctx->width * avctx->bits_per_coded_sample / 8;
44+ int linesize = av_image_get_linesize(avctx->pix_fmt, avctx->width, 0);
45 uint8_t *ptr = s->frame.data[0];
46 uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
47 int i, j;
48--
491.7.5.4
50
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
new file mode 100644
index 0000000..5ff6583
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch
@@ -0,0 +1,50 @@
1gst-ffmpeg: avcodec/parser: reset indexes on realloc failure
2
3Fixes Ticket2982
4
5Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a)
7
8Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9
10Upstream-Status: Backport
11
12Signed-off-by: Yue Tao <yue.tao@windriver.com>
13
14---
15 libavcodec/parser.c | 10 +++++++---
16 1 files changed, 7 insertions(+), 3 deletions(-)
17
18diff --git a/libavcodec/parser.c b/libavcodec/parser.c
19index 2c6de6e..66eca06 100644
20--- a/gst-libs/ext/libav/libavcodec/parser.c
21+++ b/gst-libs/ext/libav/libavcodec/parser.c
22@@ -241,8 +241,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
23 if(next == END_NOT_FOUND){
24 void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
25
26- if(!new_buffer)
27+ if(!new_buffer) {
28+ pc->index = 0;
29 return AVERROR(ENOMEM);
30+ }
31 pc->buffer = new_buffer;
32 memcpy(&pc->buffer[pc->index], *buf, *buf_size);
33 pc->index += *buf_size;
34@@ -255,9 +257,11 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
35 /* append to buffer */
36 if(pc->index){
37 void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
38-
39- if(!new_buffer)
40+ if(!new_buffer) {
41+ pc->overread_index =
42+ pc->index = 0;
43 return AVERROR(ENOMEM);
44+ }
45 pc->buffer = new_buffer;
46 if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
47 memcpy(&pc->buffer[pc->index], *buf,
48--
491.7.5.4
50
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
new file mode 100644
index 0000000..7f6eb48
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch
@@ -0,0 +1,81 @@
1gst-ffmpeg: avcodec/rpza: Perform pointer advance and checks before
2 using the pointers
3
4Fixes out of array accesses
5Fixes Ticket2850
6
7Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)
9
10Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11
12Upstream-Status: Backport
13
14Singed-off-by: Yue Tao <yue.tao@windriver.com>
15
16---
17 libavcodec/rpza.c | 8 ++++----
18 1 files changed, 4 insertions(+), 4 deletions(-)
19
20diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
21index 635b406..f291a95 100644
22--- a/gst-libs/ext/libav/libavcodec/rpza.c
23+++ b/gst-libs/ext/libav/libavcodec/rpza.c
24@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
25 unsigned short *pixels = (unsigned short *)s->frame.data[0];
26
27 int row_ptr = 0;
28- int pixel_ptr = 0;
29+ int pixel_ptr = -4;
30 int block_ptr;
31 int pixel_x, pixel_y;
32 int total_blocks;
33@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
34 colorA = AV_RB16 (&s->buf[stream_ptr]);
35 stream_ptr += 2;
36 while (n_blocks--) {
37+ ADVANCE_BLOCK()
38 block_ptr = row_ptr + pixel_ptr;
39 for (pixel_y = 0; pixel_y < 4; pixel_y++) {
40 for (pixel_x = 0; pixel_x < 4; pixel_x++){
41@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
42 }
43 block_ptr += row_inc;
44 }
45- ADVANCE_BLOCK();
46 }
47 break;
48
49@@ -184,6 +184,7 @@ static void rpza_decode_stream(RpzaContext *s)
50 color4[2] |= ((21 * ta + 11 * tb) >> 5);
51
52 while (n_blocks--) {
53+ ADVANCE_BLOCK();
54 block_ptr = row_ptr + pixel_ptr;
55 for (pixel_y = 0; pixel_y < 4; pixel_y++) {
56 index = s->buf[stream_ptr++];
57@@ -194,12 +195,12 @@ static void rpza_decode_stream(RpzaContext *s)
58 }
59 block_ptr += row_inc;
60 }
61- ADVANCE_BLOCK();
62 }
63 break;
64
65 /* Fill block with 16 colors */
66 case 0x00:
67+ ADVANCE_BLOCK();
68 block_ptr = row_ptr + pixel_ptr;
69 for (pixel_y = 0; pixel_y < 4; pixel_y++) {
70 for (pixel_x = 0; pixel_x < 4; pixel_x++){
71@@ -213,7 +214,6 @@ static void rpza_decode_stream(RpzaContext *s)
72 }
73 block_ptr += row_inc;
74 }
75- ADVANCE_BLOCK();
76 break;
77
78 /* Unknown opcode */
79--
801.7.5.4
81
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
new file mode 100644
index 0000000..3ca6fc4
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-smc-fix-off-by-1-error.patch
@@ -0,0 +1,32 @@
1From c17a0ad1df15a94d0b1239adc2afb593bdf0a153 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Fri, 3 Oct 2014 22:50:45 +0200
4Subject: [PATCH 1/2] avcodec/smc: fix off by 1 error
5
6Upstream-Status: Backport
7
8Fixes out of array access
9Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov
10
11Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13---
14 libavcodec/smc.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/gst-libs/ext/libav/libavcodec/smc.c b/gst-libs/ext/libav/libavcodec/smc.c
18index 3cd5e53..dec9f71 100644
19--- a/gst-libs/ext/libav/libavcodec/smc.c
20+++ b/gst-libs/ext/libav/libavcodec/smc.c
21@@ -69,7 +69,7 @@ typedef struct SmcContext {
22 row_ptr += stride * 4; \
23 } \
24 total_blocks--; \
25- if (total_blocks < 0) \
26+ if (total_blocks < 0 + !!n_blocks) \
27 { \
28 av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \
29 return; \
30--
312.1.0
32
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch
new file mode 100644
index 0000000..68bb66e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch
@@ -0,0 +1,69 @@
1From 12770701856a05b6b3cd706f708f8e9a4e8a1336 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Thu, 13 Feb 2014 13:59:51 +0100
4Subject: [PATCH] avformat/mpegtsenc: Check data array size in
5 mpegts_write_pmt()
6
7Upstream-Status: Backport
8
9COmmit 12770701856a05b6b3cd706f708f8e9a4e8a1336 release/0.11
10
11Prevents out of array writes
12
13Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14(cherry picked from commit 842b6c14bcfc1c5da1a2d288fd65386eb8c158ad)
15
16Conflicts:
17
18 libavformat/mpegtsenc.c
19(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)
20
21Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
22---
23 libavformat/mpegtsenc.c | 9 +++++++--
24 1 files changed, 7 insertions(+), 2 deletions(-)
25
26diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
27index 793e205..a12d19f 100644
28--- a/gst-libs/ext/libav/libavformat/mpegtsenc.c
29+++ b/gst-libs/ext/libav/libavformat/mpegtsenc.c
30@@ -240,7 +240,7 @@ static void mpegts_write_pat(AVFormatContext *s)
31 data, q - data);
32 }
33
34-static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
35+static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
36 {
37 // MpegTSWrite *ts = s->priv_data;
38 uint8_t data[1012], *q, *desc_length_ptr, *program_info_length_ptr;
39@@ -293,6 +293,10 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
40 stream_type = STREAM_TYPE_PRIVATE_DATA;
41 break;
42 }
43+
44+ if (q - data > sizeof(data) - 32)
45+ return AVERROR(EINVAL);
46+
47 *q++ = stream_type;
48 put16(&q, 0xe000 | ts_st->pid);
49 desc_length_ptr = q;
50@@ -324,7 +328,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
51 len_ptr = q++;
52 *len_ptr = 0;
53
54- for (p = lang->value; next && *len_ptr < 255 / 4 * 4; p = next + 1) {
55+ for (p = lang->value; next && *len_ptr < 255 / 4 * 4 && q - data < sizeof(data) - 4; p = next + 1) {
56 next = strchr(p, ',');
57 if (strlen(p) != 3 && (!next || next != p + 3))
58 continue; /* not a 3-letter code */
59@@ -386,6 +390,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
60 }
61 mpegts_write_section1(&service->pmt, PMT_TID, service->sid, 0, 0, 0,
62 data, q - data);
63+ return 0;
64 }
65
66 /* NOTE: str == NULL is accepted for an empty string */
67--
681.7.5.4
69
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-eamad-fix-out-of-array-accesses.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-eamad-fix-out-of-array-accesses.patch
new file mode 100644
index 0000000..f45e3fd
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-eamad-fix-out-of-array-accesses.patch
@@ -0,0 +1,29 @@
1From 63ac64864c6e0e84355aa3caa5b92208997a9a8d Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Sat, 17 Nov 2012 16:26:55 +0100
4Subject: [PATCH] eamad: fix out of array accesses
5
6Upstream-Status: Backport
7
8Commit 63ac64864c6e0e84355aa3caa5b92208997a9a8d release/1.1
9
10Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
11Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12---
13 libavcodec/eamad.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
17index 2805195..e38650e 100644
18--- a/gst-libs/ext/libav/libavcodec/eamad.c
19+++ b/gst-libs/ext/libav/libavcodec/eamad.c
20@@ -237,7 +237,7 @@ static int decode_frame(AVCodecContext *avctx,
21 int chunk_type;
22 int inter;
23
24- if (buf_size < 17) {
25+ if (buf_size < 26) {
26 av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
27 *data_size = 0;
28 return -1;
29--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
new file mode 100644
index 0000000..e0e4239
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error-concealment-initialize-block-index.patch
@@ -0,0 +1,29 @@
1gst-ffmpeg: error concealment: initialize block index.
2
3Fixes CVE-2011-3941 (out of bounds write)
4
5Upstream-Status: Backport
6
7Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
8Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9---
10 libavcodec/error_resilience.c | 3 +++
11 1 files changed, 3 insertions(+), 0 deletions(-)
12
13diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
14index 8bb5d0c..d55c000 100644
15--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
16+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
17@@ -45,6 +45,9 @@ static void decode_mb(MpegEncContext *s, int ref){
18 s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
19 s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
20
21+ ff_init_block_index(s);
22+ ff_update_block_index(s);
23+
24 if(CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264){
25 H264Context *h= (void*)s;
26 h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
27--
281.7.5.4
29
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
new file mode 100644
index 0000000..8eef6e9
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-error_concealment-Check-that-the-picture-is-not-in-a.patch
@@ -0,0 +1,37 @@
1gst-ffmpeg: error_concealment: Check that the picture is not in a half
2
3Fixes state becoming inconsistent
4Fixes a null pointer dereference
5
6Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)
9
10Upstream-Status: Backport
11
12Signed-off-by: Yue Tao <yue.tao@windriver.com>
13
14---
15 libavcodec/error_resilience.c | 6 ++++++
16 1 files changed, 6 insertions(+), 0 deletions(-)
17
18diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
19index 01f7424..2b6bc42 100644
20--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
21+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
22@@ -793,6 +793,12 @@ void ff_er_frame_end(MpegEncContext *s){
23 s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled
24 s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
25
26+ if ( s->picture_structure == PICT_FRAME
27+ && s->current_picture.linesize[0] != s->current_picture_ptr->linesize[0]) {
28+ av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
29+ return;
30+ }
31+
32 if(s->current_picture.motion_val[0] == NULL){
33 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
34
35--
361.7.5.4
37
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
new file mode 100644
index 0000000..80325db
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-ffserver-set-oformat.patch
@@ -0,0 +1,36 @@
1gst-ffmpeg: ffserver: set oformat
2
3Fix Ticket1986
4
5Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)
7
8Upstream-Status: Backport
9
10---
11 ffserver.c | 4 +++-
12 1 files changed, 3 insertions(+), 1 deletions(-)
13
14diff --git a/ffserver.c b/ffserver.c
15index 4044d0f..8740140 100644
16--- a/gst-libs/ext/libav/ffserver.c
17+++ b/gst-libs/ext/libav/ffserver.c
18@@ -2937,12 +2937,14 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
19 {
20 AVFormatContext *avc;
21 AVStream *avs = NULL;
22+ AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
23 int i;
24
25 avc = avformat_alloc_context();
26- if (avc == NULL) {
27+ if (avc == NULL || !rtp_format) {
28 return -1;
29 }
30+ avc->oformat = rtp_format;
31 av_dict_set(&avc->metadata, "title",
32 stream->title[0] ? stream->title : "No Title", 0);
33 avc->nb_streams = stream->nb_streams;
34--
351.7.5.4
36
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch
new file mode 100644
index 0000000..d4f55b2
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch
@@ -0,0 +1,29 @@
1From d6c184880ee2e09fd68c0ae217173832cee5afc1 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Sun, 18 Nov 2012 16:29:04 +0100
4Subject: [PATCH] h264: correct ref count check and limit, fix out of array
5 accesses.
6
7Upstream-Status: Backport
8
9Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
10Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11---
12 libavcodec/h264.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/libavcodec/h264.c b/libavcodec/h264.c
16index da43f1e..32cede5 100644
17--- a/gst-libs/ext/libav/libavcodec/h264.c
18+++ b/gst-libs/ext/libav/libavcodec/h264.c
19@@ -2870,6 +2870,9 @@ static int decode_slice_header(H264Conte
20 h->ref_count[0]= get_ue_golomb(&s->gb) + 1;
21 if(h->slice_type_nos==AV_PICTURE_TYPE_B)
22 h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
23+ else
24+ // full range is spec-ok in this case, even for frames
25+ h->ref_count[1] = 1;
26
27 if(h->ref_count[0]-1 > 32-1 || h->ref_count[1]-1 > 32-1){
28 av_log(h->s.avctx, AV_LOG_ERROR, "reference overflow\n");
29--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
new file mode 100644
index 0000000..05a9de3
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-set-parameters-from-SPS-whenever-it-changes.patch
@@ -0,0 +1,145 @@
1gst-ffmpeg: h264: set parameters from SPS whenever it changes
2
3Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with
4alternating bit depths.
5
6Upstream-Status: Backport
7
8Signed-off-by: Yue Tao <yue.tao@windriver.com>
9
10diff --git a/gst-libs/ext/libav/libavcodec/h264.c.old b/gst-libs/ext/libav/libavcodec/h264.c
11index 3621f41..718906a 100644
12--- a/gst-libs/ext/libav/libavcodec/h264.c.old
13+++ b/gst-libs/ext/libav/libavcodec/h264.c
14@@ -2491,6 +2491,34 @@ int ff_h264_get_profile(SPS *sps)
15 return profile;
16 }
17
18+static int h264_set_parameter_from_sps(H264Context *h)
19+{
20+ MpegEncContext *s = &h->s;
21+ AVCodecContext * avctx= s->avctx;
22+
23+ if (s->flags& CODEC_FLAG_LOW_DELAY ||
24+ (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
25+ s->low_delay=1;
26+
27+ if(avctx->has_b_frames < 2)
28+ avctx->has_b_frames= !s->low_delay;
29+
30+ if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
31+ if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
32+ avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
33+ h->pixel_shift = h->sps.bit_depth_luma > 8;
34+
35+ ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
36+ ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
37+ dsputil_init(&s->dsp, s->avctx);
38+ } else {
39+ av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
40+ return -1;
41+ }
42+ }
43+ return 0;
44+}
45+
46 /**
47 * decodes a slice header.
48 * This will also call MPV_common_init() and frame_start() as needed.
49@@ -2505,7 +2533,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
50 MpegEncContext * const s0 = &h0->s;
51 unsigned int first_mb_in_slice;
52 unsigned int pps_id;
53- int num_ref_idx_active_override_flag;
54+ int num_ref_idx_active_override_flag, ret;
55 unsigned int slice_type, tmp, i, j;
56 int default_ref_list_done = 0;
57 int last_pic_structure;
58@@ -2569,7 +2597,17 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
59 av_log(h->s.avctx, AV_LOG_ERROR, "non-existing SPS %u referenced\n", h->pps.sps_id);
60 return -1;
61 }
62- h->sps = *h0->sps_buffers[h->pps.sps_id];
63+
64+ if (h->pps.sps_id != h->current_sps_id ||
65+ h0->sps_buffers[h->pps.sps_id]->new) {
66+ h0->sps_buffers[h->pps.sps_id]->new = 0;
67+
68+ h->current_sps_id = h->pps.sps_id;
69+ h->sps = *h0->sps_buffers[h->pps.sps_id];
70+
71+ if ((ret = h264_set_parameter_from_sps(h)) < 0)
72+ return ret;
73+ }
74
75 s->avctx->profile = ff_h264_get_profile(&h->sps);
76 s->avctx->level = h->sps.level_idc;
77@@ -3811,26 +3811,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
78 case NAL_SPS:
79 init_get_bits(&s->gb, ptr, bit_length);
80 ff_h264_decode_seq_parameter_set(h);
81-
82- if (s->flags& CODEC_FLAG_LOW_DELAY ||
83- (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames))
84- s->low_delay=1;
85-
86- if(avctx->has_b_frames < 2)
87- avctx->has_b_frames= !s->low_delay;
88-
89- if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) {
90- if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
91- avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
92- h->pixel_shift = h->sps.bit_depth_luma > 8;
93-
94- ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma);
95- ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma);
96- dsputil_init(&s->dsp, s->avctx);
97- } else {
98- av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
99- return -1;
100- }
101+ if (h264_set_parameter_from_sps(h) < 0) {
102+ return -1;
103 }
104 break;
105 case NAL_PPS:
106diff --git a/gst-libs/ext/libav/libavcodec/h264.h.old b/gst-libs/ext/libav/libavcodec/h264.h
107index e3cc815..b77ad98 100644
108--- a/gst-libs/ext/libav/libavcodec/h264.h.old
109+++ b/gst-libs/ext/libav/libavcodec/h264.h
110@@ -202,6 +202,7 @@ typedef struct SPS{
111 int bit_depth_chroma; ///< bit_depth_chroma_minus8 + 8
112 int residual_color_transform_flag; ///< residual_colour_transform_flag
113 int constraint_set_flags; ///< constraint_set[0-3]_flag
114+ int new; ///< flag to keep track if the decoder context needs re-init due to changed SPS
115 }SPS;
116
117 /**
118@@ -333,6 +334,7 @@ typedef struct H264Context{
119 int emu_edge_width;
120 int emu_edge_height;
121
122+ unsigned current_sps_id; ///< id of the current SPS
123 SPS sps; ///< current sps
124
125 /**
126diff --git a/gst-libs/ext/libav/libavcodec/h264_ps.c.old b/gst-libs/ext/libav/libavcodec/h264_ps.c
127index 7491807..0929098 100644
128--- a/gst-libs/ext/libav/libavcodec/h264_ps.c.old
129+++ b/gst-libs/ext/libav/libavcodec/h264_ps.c
130@@ -438,10 +438,13 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
131 sps->timing_info_present_flag ? sps->time_scale : 0
132 );
133 }
134+ sps->new = 1;
135
136 av_free(h->sps_buffers[sps_id]);
137- h->sps_buffers[sps_id]= sps;
138- h->sps = *sps;
139+ h->sps_buffers[sps_id] = sps;
140+ h->sps = *sps;
141+ h->current_sps_id = sps_id;
142+
143 return 0;
144 fail:
145 av_free(sps);
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
new file mode 100644
index 0000000..5d45c1a
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch
@@ -0,0 +1,33 @@
1gst-ffmpeg: h264: skip error concealment when SPS and slices are
2 mismatching
3
4Fixes out of array accesses
5
6Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8(cherry picked from commit 695af8eed642ff0104834495652d1ee784a4c14d)
9
10Upstream-Status: Backport
11
12Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13Signed-off-by: Yue Tao <yue.tao@windriver.com>
14---
15 libavcodec/h264.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18diff --git a/libavcodec/h264.c b/libavcodec/h264.c
19index da144db..0aab4e7 100644
20--- a/gst-libs/ext/libav/libavcodec/h264.c
21+++ b/gst-libs/ext/libav/libavcodec/h264.c
22@@ -2351,7 +2351,7 @@ static int field_end(H264Context *h, int in_setup)
23 * past end by one (callers fault) and resync_mb_y != 0
24 * causes problems for the first MB line, too.
25 */
26- if (!FIELD_PICTURE)
27+ if (!FIELD_PICTURE && h->current_slice && !h->sps.new)
28 ff_er_frame_end(s);
29
30 ff_MPV_frame_end(s);
31--
321.7.5.4
33
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
new file mode 100644
index 0000000..1e62b50
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264_sei-Fix-infinite-loop.patch
@@ -0,0 +1,39 @@
1gst-ffmpeg: h264_sei: Fix infinite loop.
2
3Fixsot yet fixed parts of CVE-2011-3946.
4
5Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
6Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7
8Upstream-Status: Backport
9
10Signed-off-by: Yue Tao <yue.tao@windriver.com>
11
12---
13 libavcodec/h264_sei.c | 4 ++++
14 1 files changed, 4 insertions(+), 0 deletions(-)
15
16
17diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
18index 374e53d..80d70e5 100644
19--- a/gst-libs/ext/libav/libavcodec/h264_sei.c
20+++ b/gst-libs/ext/libav/libavcodec/h264_sei.c
21@@ -169,11 +169,15 @@ int ff_h264_decode_sei(H264Context *h){
22
23 type=0;
24 do{
25+ if (get_bits_left(&s->gb) < 8)
26+ return -1;
27 type+= show_bits(&s->gb, 8);
28 }while(get_bits(&s->gb, 8) == 255);
29
30 size=0;
31 do{
32+ if (get_bits_left(&s->gb) < 8)
33+ return -1;
34 size+= show_bits(&s->gb, 8);
35 }while(get_bits(&s->gb, 8) == 255);
36
37--
381.7.5.4
39
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Check-init_vlc-return-codes.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Check-init_vlc-return-codes.patch
new file mode 100644
index 0000000..e859e44
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Check-init_vlc-return-codes.patch
@@ -0,0 +1,87 @@
1From b666debffec1fcbb19ef377635a53b9a58bca8a4 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Tue, 29 Jan 2013 18:29:41 +0100
4Subject: [PATCH] huffyuvdec: Check init_vlc() return codes.
5
6Upstream-Status: Backport
7
8Commit b666debffec1fcbb19ef377635a53b9a58bca8a4 release/1.0
9
10Prevents out of array writes
11
12Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
13Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14(cherry picked from commit f67a0d115254461649470452058fa3c28c0df294)
15
16Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
17---
18 libavcodec/huffyuv.c | 14 ++++++++++----
19 1 file changed, 10 insertions(+), 4 deletions(-)
20
21diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
22index 58da789..993e524 100644
23--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
24+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
25@@ -33,6 +33,7 @@
26 #include "put_bits.h"
27 #include "dsputil.h"
28 #include "thread.h"
29+#include "libavutil/avassert.h"
30
31 #define VLC_BITS 11
32
33@@ -287,6 +287,7 @@ static void generate_joint_tables(HYuvCo
34 int len1 = s->len[p][u];
35 if (len1 > limit || !len1)
36 continue;
37+ av_assert0(i < (1 << VLC_BITS));
38 len[i] = len0 + len1;
39 bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
40 symbols[i] = (y<<8) + u;
41@@ -320,6 +321,7 @@ static void generate_joint_tables(HYuvCo
42 int len2 = s->len[2][r&255];
43 if (len2 > limit1 || !len2)
44 continue;
45+ av_assert0(i < (1 << VLC_BITS));
46 len[i] = len0 + len1 + len2;
47 bits[i] = (code << len2) + s->bits[2][r&255];
48 if(s->decorrelate){
49@@ -343,6 +345,7 @@ static void generate_joint_tables(HYuvCo
50 static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
51 GetBitContext gb;
52 int i;
53+ int ret;
54
55 init_get_bits(&gb, src, length*8);
56
57@@ -353,7 +356,9 @@ static int read_huffman_tables(HYuvConte
58 return -1;
59 }
60 free_vlc(&s->vlc[i]);
61- init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
62+ if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
63+ s->bits[i], 4, 4, 0)) < 0)
64+ return ret;
65 }
66
67 generate_joint_tables(s);
68@@ -365,6 +370,7 @@ static int read_old_huffman_tables(HYuvC
69 #if 1
70 GetBitContext gb;
71 int i;
72+ int ret;
73
74 init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8);
75 if(read_len_table(s->len[0], &gb)<0)
76@@ -385,7 +391,9 @@ static int read_old_huffman_tables(HYuvC
77
78 for(i=0; i<3; i++){
79 free_vlc(&s->vlc[i]);
80- init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
81+ if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
82+ s->bits[i], 4, 4, 0)) < 0)
83+ return ret;
84 }
85
86 generate_joint_tables(s);
87--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch
new file mode 100644
index 0000000..94bf4b6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch
@@ -0,0 +1,61 @@
1From db0f7f7394e1f994ed38db043f78ed0f10bde0da Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Tue, 29 Jan 2013 19:22:33 +0100
4Subject: [PATCH] huffyuvdec: Skip len==0 cases
5
6Upstream-Status: Backport
7
8Commit db0f7f7394e1f994ed38db043f78ed0f10bde0da release/1.0
9
10Fixes vlc decoding for hypothetical files that would contain such cases.
11
12Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13(cherry picked from commit 0dfc01c2bbf4b71bb56201bc4a393321e15d1b31)
14
15Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
16---
17 libavcodec/huffyuv.c | 10 +++++-----
18 1 file changed, 5 insertions(+), 5 deletions(-)
19
20diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
21index 993e524..72ed351 100644
22--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
23+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
24@@ -281,11 +281,11 @@ static void generate_joint_tables(HYuvCo
25 for(i=y=0; y<256; y++){
26 int len0 = s->len[0][y];
27 int limit = VLC_BITS - len0;
28- if(limit <= 0)
29+ if(limit <= 0 || !len0)
30 continue;
31 for(u=0; u<256; u++){
32 int len1 = s->len[p][u];
33- if(len1 > limit)
34+ if (len1 > limit || !len1)
35 continue;
36 len[i] = len0 + len1;
37 bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
38@@ -308,17 +308,17 @@ static void generate_joint_tables(HYuvCo
39 for(i=0, g=-16; g<16; g++){
40 int len0 = s->len[p0][g&255];
41 int limit0 = VLC_BITS - len0;
42- if(limit0 < 2)
43+ if (limit0 < 2 || !len0)
44 continue;
45 for(b=-16; b<16; b++){
46 int len1 = s->len[p1][b&255];
47 int limit1 = limit0 - len1;
48- if(limit1 < 1)
49+ if (limit1 < 1 || !len1)
50 continue;
51 code = (s->bits[p0][g&255] << len1) + s->bits[p1][b&255];
52 for(r=-16; r<16; r++){
53 int len2 = s->len[2][r&255];
54- if(len2 > limit1)
55+ if (len2 > limit1 || !len2)
56 continue;
57 len[i] = len0 + len1 + len2;
58 bits[i] = (code << len2) + s->bits[2][r&255];
59--
601.8.5.2.233.g932f7e4
61
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch
new file mode 100644
index 0000000..6b60d16
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-huffyuvdec-check-width-more-completely-avoid-out-of-.patch
@@ -0,0 +1,30 @@
1gst-ffmpeg: huffyuvdec: check width more completely, avoid out of array
2 accesses
3
4Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
5
6Upstream-Status: Backport
7
8Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9---
10 libavcodec/huffyuv.c | 5 ++++-
11 1 files changed, 4 insertions(+), 1 deletions(-)
12
13diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
14index 6e88114..ca5bcd8 100644
15--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
16+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
17@@ -526,6 +526,10 @@ s->bgr32=1;
18 assert(0);
19 }
20
21+ if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P && avctx->width%4) {
22+ av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 this colorspace and predictor\n");
23+ return AVERROR_INVALIDDATA;
24+ }
25 alloc_temp(s);
26
27 // av_log(NULL, AV_LOG_DEBUG, "pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_coded_sample, s->interlaced);
28--
291.7.5.4
30
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
new file mode 100644
index 0000000..ea4aa22
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-lavf-compute-probe-buffer-size-more-reliably.patch
@@ -0,0 +1,45 @@
1gst-ffmpeg: lavf: compute probe buffer size more reliably.
2
3The previous code computes the offset by reversing the growth
4of the allocated buffer size: it is complex and did lead to
5inconsistencies when the size limit is reached.
6
7Fix trac ticket #1991.
8(cherry picked from commit 03847eb8259291b4ff1bd840bd779d0699d71f96)
9
10Conflicts:
11 libavformat/utils.c
12
13Upstream-Status: Backport
14
15Signed-off-by: Yue Tao <yue.tao@windriver.com>
16
17---
18 libavformat/utils.c | 4 ++--
19 1 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/libavformat/utils.c b/libavformat/utils.c
22index 7940037..be73c4a 100644
23--- a/gst-libs/ext/libav/libavformat/utils.c
24+++ b/gst-libs/ext/libav/libavformat/utils.c
25@@ -459,7 +459,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
26 {
27 AVProbeData pd = { filename ? filename : "", NULL, -offset };
28 unsigned char *buf = NULL;
29- int ret = 0, probe_size;
30+ int ret = 0, probe_size, buf_offset = 0;
31
32 if (!max_probe_size) {
33 max_probe_size = PROBE_BUF_MAX;
34@@ -499,7 +499,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
35 score = 0;
36 ret = 0; /* error was end of file, nothing read */
37 }
38- pd.buf_size += ret;
39+ pd.buf_size = buf_offset += ret;
40 pd.buf = &buf[offset];
41
42 memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
43--
441.7.5.4
45
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-mjpegdec-check-SE.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-mjpegdec-check-SE.patch
new file mode 100644
index 0000000..d90bafa
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-mjpegdec-check-SE.patch
@@ -0,0 +1,32 @@
1From 1f41cffe1e3e79620f587545bdfcbd7e6e68ed29 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Sun, 11 Nov 2012 00:01:24 +0100
4Subject: [PATCH] mjpegdec: check SE.
5
6Upstream-Status: Backport
7
8Commit 1f41cffe1e3e79620f587545bdfcbd7e6e68ed29 release/1.1
9
10Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
11Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12---
13 libavcodec/mjpegdec.c | 5 +++++
14 1 file changed, 5 insertions(+)
15
16diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
17index 6b5266d..0a71a6f 100644
18--- a/gst-libs/ext/libav/libavcodec/mjpegdec.c
19+++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c
20@@ -905,6 +905,11 @@ static int mjpeg_decode_scan_progressive
21 int16_t *quant_matrix = s->quant_matrixes[ s->quant_index[c] ];
22 GetBitContext mb_bitmask_gb;
23
24+ if (se > 63) {
25+ av_log(s->avctx, AV_LOG_ERROR, "SE %d is too large\n", se);
26+ return AVERROR_INVALIDDATA;
27+ }
28+
29 if (mb_bitmask) {
30 init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width*s->mb_height);
31 }
32--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch
new file mode 100644
index 0000000..1041347
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch
@@ -0,0 +1,34 @@
1From 28bf685bfc6d0c744369cdf367f61a78d80d0b01 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Thu, 15 Nov 2012 16:41:28 +0100
4Subject: [PATCH] pgssubdec: check RLE size before copying. Fix out of array
5 accesses
6
7Upstream-Status: Backport
8
9Commit 28bf685bfc6d0c744369cdf367f61a78d80d0b01 release/1.1
10
11Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13(cherry picked from commit c0d68be555f5858703383040e04fcd6529777061)
14---
15 libavcodec/pgssubdec.c | 5 +++++
16 1 file changed, 5 insertions(+)
17
18diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
19index 728f178..26a3c2a 100644
20--- a/gst-libs/ext/libav/libavcodec/pgssubdec.c
21+++ b/gst-libs/ext/libav/libavcodec/pgssubdec.c
22@@ -202,6 +202,11 @@ static int parse_picture_segment(AVCodec
23 return -1;
24 }
25
26+ if (buf_size > rle_bitmap_len) {
27+ av_log(avctx, AV_LOG_ERROR, "too much RLE data\n");
28+ return AVERROR_INVALIDDATA;
29+ }
30+
31 ctx->picture.w = width;
32 ctx->picture.h = height;
33
34--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
new file mode 100644
index 0000000..1e5fb7d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch
@@ -0,0 +1,44 @@
1gst-ffmpeg: pngdec/filter: dont access out of array elements at the end
2
3Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
4
5Upstream-Status: Backport
6
7Signed-off-by: Yue Tao <yue.tao@windriver.com>
8---
9 libavcodec/pngdec.c | 12 ++++--------
10 1 files changed, 4 insertions(+), 8 deletions(-)
11
12diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
13index 97c0ad1..193e35e 100644
14--- a/gst-libs/ext/libav/libavcodec/pngdec.c
15+++ b/gst-libs/ext/libav/libavcodec/pngdec.c
16@@ -190,7 +190,7 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
17 if(bpp >= 2) g = dst[1];\
18 if(bpp >= 3) b = dst[2];\
19 if(bpp >= 4) a = dst[3];\
20- for(; i < size; i+=bpp) {\
21+ for(; i <= size - bpp; i+=bpp) {\
22 dst[i+0] = r = op(r, src[i+0], last[i+0]);\
23 if(bpp == 1) continue;\
24 dst[i+1] = g = op(g, src[i+1], last[i+1]);\
25@@ -206,13 +206,9 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
26 else if(bpp == 2) UNROLL1(2, op)\
27 else if(bpp == 3) UNROLL1(3, op)\
28 else if(bpp == 4) UNROLL1(4, op)\
29- else {\
30- for (; i < size; i += bpp) {\
31- int j;\
32- for (j = 0; j < bpp; j++)\
33- dst[i+j] = op(dst[i+j-bpp], src[i+j], last[i+j]);\
34- }\
35- }
36+ for (; i < size; i++) {\
37+ dst[i] = op(dst[i-bpp], src[i], last[i]);\
38+ }\
39
40 /* NOTE: 'dst' can be equal to 'last' */
41 static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
42--
431.7.5.4
44
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
new file mode 100644
index 0000000..8c94232
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch
@@ -0,0 +1,30 @@
1gst-ffmpeg: qdm2: check array index before use, fix out of array
2 accesses
3
4Upstream-Status: Backport
5
6Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8---
9 libavcodec/qdm2.c | 5 +++++
10 1 files changed, 5 insertions(+), 0 deletions(-)
11
12diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
13index 4cf4b2f..1dfb8d5 100644
14--- a/gst-libs/ext/libav/libavcodec/qdm2.c
15+++ b/gst-libs/ext/libav/libavcodec/qdm2.c
16@@ -1257,6 +1257,11 @@ static void qdm2_decode_super_block (QDM2Context *q)
17 for (i = 0; packet_bytes > 0; i++) {
18 int j;
19
20+ if (i>=FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
21+ SAMPLES_NEEDED_2("too many packet bytes");
22+ return;
23+ }
24+
25 q->sub_packet_list_A[i].next = NULL;
26
27 if (i > 0) {
28--
291.7.5.4
30
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
new file mode 100644
index 0000000..43ffc03
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-qdm2dec-fix-buffer-overflow.patch
@@ -0,0 +1,58 @@
1gst-ffmpeg: qdm2dec: fix buffer overflow. Fixes NGS00144
2
3This also adds a few lines of code from master that are needed for this fix.
4
5Thanks to Phillip for suggestions to improve the patch.
6Found-by: Phillip Langlois
7
8Upstream-Status: Backport
9
10Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11---
12 libavcodec/qdm2.c | 9 +++++++--
13 1 files changed, 7 insertions(+), 2 deletions(-)
14
15diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
16index 3aa9e5b..e000df8 100644
17--- a/gst-libs/ext/libav/libavcodec/qdm2.c
18+++ b/gst-libs/ext/libav/libavcodec/qdm2.c
19@@ -76,6 +76,7 @@ do { \
20 #define SAMPLES_NEEDED_2(why) \
21 av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why);
22
23+#define QDM2_MAX_FRAME_SIZE 512
24
25 typedef int8_t sb_int8_array[2][30][64];
26
27@@ -168,7 +169,7 @@ typedef struct {
28 /// I/O data
29 const uint8_t *compressed_data;
30 int compressed_size;
31- float output_buffer[1024];
32+ float output_buffer[QDM2_MAX_FRAME_SIZE * MPA_MAX_CHANNELS * 2];
33
34 /// Synthesis filter
35 MPADSPContext mpadsp;
36@@ -1819,6 +1820,9 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
37 s->group_order = av_log2(s->group_size) + 1;
38 s->frame_size = s->group_size / 16; // 16 iterations per super block
39
40+ if (s->frame_size > QDM2_MAX_FRAME_SIZE)
41+ return AVERROR_INVALIDDATA;
42+
43 s->sub_sampling = s->fft_order - 7;
44 s->frequency_range = 255 / (1 << (2 - s->sub_sampling));
45
46@@ -1887,6 +1891,9 @@ static int qdm2_decode (QDM2Context *q, const uint8_t *in, int16_t *out)
47 int ch, i;
48 const int frame_size = (q->frame_size * q->channels);
49
50+ if((unsigned)frame_size > FF_ARRAY_ELEMS(q->output_buffer)/2)
51+ return -1;
52+
53 /* select input buffer */
54 q->compressed_data = in;
55 q->compressed_size = q->checksum_size;
56--
571.7.5.4
58
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-roqvideodec-check-dimensions-validity.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-roqvideodec-check-dimensions-validity.patch
new file mode 100644
index 0000000..7e58afc
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-roqvideodec-check-dimensions-validity.patch
@@ -0,0 +1,36 @@
1From 391e0fc6c90ced6656b74f50f3a487b6dc76ea63 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Thu, 29 Nov 2012 15:18:17 +0100
4Subject: [PATCH] roqvideodec: check dimensions validity
5
6Upstream-Status: Backport
7
8Commit 391e0fc6c90ced6656b74f50f3a487b6dc76ea63 release/0.7
9
10Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
11Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12(cherry picked from commit 3ae610451170cd5a28b33950006ff0bd23036845)
13
14Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
15---
16 libavcodec/roqvideodec.c | 6 ++++++
17 1 file changed, 6 insertions(+)
18
19diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
20index f0977f6..4e34231 100644
21--- a/gst-libs/ext/libav/libavcodec/roqvideodec.c
22+++ b/gst-libs/ext/libav/libavcodec/roqvideodec.c
23@@ -157,6 +157,12 @@ static av_cold int roq_decode_init(AVCodecContext *avctx)
24 RoqContext *s = avctx->priv_data;
25
26 s->avctx = avctx;
27+
28+ if (avctx->width%16 || avctx->height%16) {
29+ av_log_ask_for_sample(avctx, "dimensions not being a multiple of 16 are unsupported\n");
30+ return AVERROR_PATCHWELCOME;
31+ }
32+
33 s->width = avctx->width;
34 s->height = avctx->height;
35 avcodec_get_frame_defaults(&s->frames[0]);
36--
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
new file mode 100644
index 0000000..15b1614
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch
@@ -0,0 +1,32 @@
1gst-ffmpeg: smackerdec: Check that the last indexes are within the
2 table.
3
4Fixes CVE-2011-3944
5
6Upstream-Status: Backport
7
8Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
9Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10---
11 libavcodec/smacker.c | 5 +++++
12 1 files changed, 5 insertions(+), 0 deletions(-)
13
14diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
15index 30f99b4..2a8bae8 100644
16--- a/gst-libs/ext/libav/libavcodec/smacker.c
17+++ b/gst-libs/ext/libav/libavcodec/smacker.c
18@@ -259,6 +259,11 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
19 if(ctx.last[0] == -1) ctx.last[0] = huff.current++;
20 if(ctx.last[1] == -1) ctx.last[1] = huff.current++;
21 if(ctx.last[2] == -1) ctx.last[2] = huff.current++;
22+ if(huff.current > huff.length){
23+ ctx.last[0] = ctx.last[1] = ctx.last[2] = 1;
24+ av_log(smk->avctx, AV_LOG_ERROR, "bigtree damaged\n");
25+ return -1;
26+ }
27
28 *recodes = huff.values;
29
30--
311.7.5.4
32
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
new file mode 100644
index 0000000..a1989cf
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-Copy-all-3-frames-for-thread-updates.patch
@@ -0,0 +1,32 @@
1gst-ffmpeg: vp3: Copy all 3 frames for thread updates.
2
3This fixes a double release of the current frame on deinit.
4Fixes CVE-2011-3934
5
6Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8
9Upstream-Status: Backport
10
11Signed-off-by: Yue.Tao <yue.tao@windriver.com>
12
13---
14 libavcodec/vp3.c | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
18index 738ae9f..b5daafc 100644
19--- a/gst-libs/ext/libav/libavcodec/vp3.c
20+++ b/gst-libs/ext/libav/libavcodec/vp3.c
21@@ -1859,7 +1859,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
22 ||s->width != s1->width
23 ||s->height!= s1->height) {
24 if (s != s1)
25- copy_fields(s, s1, golden_frame, current_frame);
26+ copy_fields(s, s1, golden_frame, keyframe);
27 return -1;
28 }
29
30--
311.7.5.4
32
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
new file mode 100644
index 0000000..e83d8f4
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch
@@ -0,0 +1,183 @@
1gst-ffmpeg: vp3: fix oob read for negative tokens and memleaks on error.
2
3Upstream-Status: Backport
4
5Signed-off-by: Yue.Tao <yue.tao@windriver.com>
6
7---
8 libavcodec/vp3.c | 59 +++++++++++++++++++++++++++++++++++++++++------------
9 1 files changed, 45 insertions(+), 14 deletions(-)
10
11diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
12index 36715bb..ce14e63 100644
13--- a/gst-libs/ext/libav/libavcodec/vp3.c
14+++ b/gst-libs/ext/libav/libavcodec/vp3.c
15@@ -45,6 +45,7 @@
16 #define FRAGMENT_PIXELS 8
17
18 static av_cold int vp3_decode_end(AVCodecContext *avctx);
19+static void vp3_decode_flush(AVCodecContext *avctx);
20
21 //FIXME split things out into their own arrays
22 typedef struct Vp3Fragment {
23@@ -890,7 +891,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
24 /* decode a VLC into a token */
25 token = get_vlc2(gb, vlc_table, 11, 3);
26 /* use the token to get a zero run, a coefficient, and an eob run */
27- if (token <= 6) {
28+ if ((unsigned) token <= 6U) {
29 eob_run = eob_run_base[token];
30 if (eob_run_get_bits[token])
31 eob_run += get_bits(gb, eob_run_get_bits[token]);
32@@ -908,7 +909,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
33 coeff_i += eob_run;
34 eob_run = 0;
35 }
36- } else {
37+ } else if (token >= 0) {
38 bits_to_get = coeff_get_bits[token];
39 if (bits_to_get)
40 bits_to_get = get_bits(gb, bits_to_get);
41@@ -942,6 +943,10 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
42 for (i = coeff_index+1; i <= coeff_index+zero_run; i++)
43 s->num_coded_frags[plane][i]--;
44 coeff_i++;
45+ } else {
46+ av_log(s->avctx, AV_LOG_ERROR,
47+ "Invalid token %d\n", token);
48+ return -1;
49 }
50 }
51
52@@ -991,6 +996,8 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
53 /* unpack the Y plane DC coefficients */
54 residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_y_table], 0,
55 0, residual_eob_run);
56+ if (residual_eob_run < 0)
57+ return residual_eob_run;
58
59 /* reverse prediction of the Y-plane DC coefficients */
60 reverse_dc_prediction(s, 0, s->fragment_width[0], s->fragment_height[0]);
61@@ -998,8 +1005,12 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
62 /* unpack the C plane DC coefficients */
63 residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
64 1, residual_eob_run);
65+ if (residual_eob_run < 0)
66+ return residual_eob_run;
67 residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
68 2, residual_eob_run);
69+ if (residual_eob_run < 0)
70+ return residual_eob_run;
71
72 /* reverse prediction of the C-plane DC coefficients */
73 if (!(s->avctx->flags & CODEC_FLAG_GRAY))
74@@ -1036,11 +1047,17 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
75 for (i = 1; i <= 63; i++) {
76 residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
77 0, residual_eob_run);
78+ if (residual_eob_run < 0)
79+ return residual_eob_run;
80
81 residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
82 1, residual_eob_run);
83+ if (residual_eob_run < 0)
84+ return residual_eob_run;
85 residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
86 2, residual_eob_run);
87+ if (residual_eob_run < 0)
88+ return residual_eob_run;
89 }
90
91 return 0;
92@@ -1777,10 +1794,15 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
93 Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data;
94 int qps_changed = 0, i, err;
95
96+#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
97+
98 if (!s1->current_frame.data[0]
99 ||s->width != s1->width
100- ||s->height!= s1->height)
101+ ||s->height!= s1->height) {
102+ if (s != s1)
103+ copy_fields(s, s1, golden_frame, current_frame);
104 return -1;
105+ }
106
107 if (s != s1) {
108 // init tables if the first frame hasn't been decoded
109@@ -1796,8 +1818,6 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
110 memcpy(s->motion_val[1], s1->motion_val[1], c_fragment_count * sizeof(*s->motion_val[1]));
111 }
112
113-#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
114-
115 // copy previous frame data
116 copy_fields(s, s1, golden_frame, dsp);
117
118@@ -1987,9 +2007,6 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
119 Vp3DecodeContext *s = avctx->priv_data;
120 int i;
121
122- if (avctx->is_copy && !s->current_frame.data[0])
123- return 0;
124-
125 av_free(s->superblock_coding);
126 av_free(s->all_fragments);
127 av_free(s->coded_fragment_list[0]);
128@@ -2016,12 +2033,7 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
129 free_vlc(&s->motion_vector_vlc);
130
131 /* release all frames */
132- if (s->golden_frame.data[0])
133- ff_thread_release_buffer(avctx, &s->golden_frame);
134- if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY)
135- ff_thread_release_buffer(avctx, &s->last_frame);
136- /* no need to release the current_frame since it will always be pointing
137- * to the same frame as either the golden or last frame */
138+ vp3_decode_flush(avctx);
139
140 return 0;
141 }
142@@ -2341,6 +2353,23 @@ static void vp3_decode_flush(AVCodecContext *avctx)
143 ff_thread_release_buffer(avctx, &s->current_frame);
144 }
145
146+static int vp3_init_thread_copy(AVCodecContext *avctx)
147+{
148+ Vp3DecodeContext *s = avctx->priv_data;
149+
150+ s->superblock_coding = NULL;
151+ s->all_fragments = NULL;
152+ s->coded_fragment_list[0] = NULL;
153+ s->dct_tokens_base = NULL;
154+ s->superblock_fragments = NULL;
155+ s->macroblock_coding = NULL;
156+ s->motion_val[0] = NULL;
157+ s->motion_val[1] = NULL;
158+ s->edge_emu_buffer = NULL;
159+
160+ return 0;
161+}
162+
163 AVCodec ff_theora_decoder = {
164 .name = "theora",
165 .type = AVMEDIA_TYPE_VIDEO,
166@@ -2352,6 +2381,7 @@ AVCodec ff_theora_decoder = {
167 .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
168 .flush = vp3_decode_flush,
169 .long_name = NULL_IF_CONFIG_SMALL("Theora"),
170+ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
171 .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
172 };
173 #endif
174@@ -2367,5 +2397,6 @@ AVCodec ff_vp3_decoder = {
175 .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
176 .flush = vp3_decode_flush,
177 .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
178+ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
179 .update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
180 };
181--
1821.7.5.4
183
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch
new file mode 100644
index 0000000..7e4f682
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch
@@ -0,0 +1,51 @@
1From 2cac35086c9e103fa98960c546d5017e7363803a Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Fri, 25 Jan 2013 06:11:59 +0100
4Subject: [PATCH] vqavideo: check chunk sizes before reading chunks
5
6Upstream-Status: Backport
7
8Commit 2cac35086c9e103fa98960c546d5017e7363803a release/0.7
9
10Fixes out of array writes
11
12Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
13Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)
15
16Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
17---
18 libavcodec/vqavideo.c | 10 ++++++++++
19 1 files changed, 10 insertions(+), 0 deletions(-)
20
21diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
22index d1eab5b..6e1ce6c 100644
23--- a/gst-libs/ext/libav/libavcodec/vqavideo.c
24+++ b/gst-libs/ext/libav/libavcodec/vqavideo.c
25@@ -527,6 +527,11 @@ static void vqa_decode_chunk(VqaContext *s)
26 chunk_size = AV_RB32(&s->buf[cbp0_chunk + 4]);
27 cbp0_chunk += CHUNK_PREAMBLE_SIZE;
28
29+ if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
30+ av_log(s->avctx, AV_LOG_ERROR, "cbp0 chunk too large (0x%X bytes)\n", chunk_size);
31+ return AVERROR_INVALIDDATA;
32+ }
33+
34 /* accumulate partial codebook */
35 memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
36 &s->buf[cbp0_chunk], chunk_size);
37@@ -550,6 +555,11 @@ static void vqa_decode_chunk(VqaContext *s)
38 chunk_size = AV_RB32(&s->buf[cbpz_chunk + 4]);
39 cbpz_chunk += CHUNK_PREAMBLE_SIZE;
40
41+ if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
42+ av_log(s->avctx, AV_LOG_ERROR, "cbpz chunk too large (0x%X bytes)\n", chunk_size);
43+ return AVERROR_INVALIDDATA;
44+ }
45+
46 /* accumulate partial codebook */
47 memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
48 &s->buf[cbpz_chunk], chunk_size);
49--
501.7.5.4
51
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
new file mode 100644
index 0000000..c8bafd5
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch
@@ -0,0 +1,68 @@
1From 6043c431c97d55173f339fafbd033d3c0642e2e9 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Fri, 3 Oct 2014 01:50:27 +0200
4Subject: [PATCH 2/2] avcodec/mjpegdec: check bits per pixel for changes
5 similar to dimensions
6
7Upstream-Status: Backport
8
9Fixes out of array accesses
10Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi
11
12Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
13Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14
15Conflicts:
16 libavcodec/mjpegdec.c
17---
18 libavcodec/mjpegdec.c | 15 ++++++++-------
19 1 file changed, 8 insertions(+), 7 deletions(-)
20
21diff --git a/gst-libs/ext/libav/libavcodec/mjpegdec.c b/gst-libs/ext/libav/libavcodec/mjpegdec.c
22index 84343c0..c0137d8 100644
23--- a/gst-libs/ext/libav/libavcodec/mjpegdec.c
24+++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c
25@@ -210,16 +210,16 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
26
27 int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
28 {
29- int len, nb_components, i, width, height, pix_fmt_id;
30+ int len, nb_components, i, bits, width, height, pix_fmt_id;
31
32 /* XXX: verify len field validity */
33 len = get_bits(&s->gb, 16);
34- s->bits= get_bits(&s->gb, 8);
35+ bits= get_bits(&s->gb, 8);
36
37- if(s->pegasus_rct) s->bits=9;
38- if(s->bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly
39+ if(s->pegasus_rct) bits=9;
40+ if(bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly
41
42- if (s->bits != 8 && !s->lossless){
43+ if (bits != 8 && !s->lossless){
44 av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n");
45 return -1;
46 }
47@@ -239,7 +239,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
48 if (nb_components <= 0 ||
49 nb_components > MAX_COMPONENTS)
50 return -1;
51- if (s->ls && !(s->bits <= 8 || nb_components == 1)){
52+ if (s->ls && !(bits <= 8 || nb_components == 1)){
53 av_log(s->avctx, AV_LOG_ERROR, "only <= 8 bits/component or 16-bit gray accepted for JPEG-LS\n");
54 return -1;
55 }
56@@ -272,10 +272,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
57
58 /* if different size, realloc/alloc picture */
59 /* XXX: also check h_count and v_count */
60- if (width != s->width || height != s->height) {
61+ if (width != s->width || height != s->height || bits != s->bits) {
62 av_freep(&s->qscale_table);
63
64 s->width = width;
65+ s->bits= bits;
66 s->height = height;
67 s->interlaced = 0;
68
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/configure-fix.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/configure-fix.patch
new file mode 100644
index 0000000..9ef6f7c
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/configure-fix.patch
@@ -0,0 +1,22 @@
1Disable yasm for libav when --disable-yasm
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Shane Wang <shane.wang@intel.com>
6
7diff -r f2f8f74c6e30 configure.ac
8--- a/configure.ac Thu Dec 22 23:56:09 2011 +0800
9+++ b/configure.ac Thu Dec 22 23:57:37 2011 +0800
10@@ -325,6 +325,12 @@
11 --enable-gpl"
12 fi
13
14+ AC_ARG_ENABLE(yasm,
15+ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])])
16+ if test "x$enable_yasm" = "xno"; then
17+ embffmpeg_configure_args="$embffmpeg_configure_args --disable-yasm"
18+ fi
19+
20 # if we are cross-compiling, tell ffmpeg so
21 target_os=`echo $host_os | sed 's/-gnu//'`
22 if test "x$cross_compiling" = xyes; then
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
new file mode 100644
index 0000000..3c8d8e3
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-0855.patch
@@ -0,0 +1,100 @@
1gst-ffmpeg: Security Advisory - ffmpeg - CVE-2013-0855
2
3Upstream-Status: Backport
4
5Signed-off-by: Yue Tao <yue.tao@windriver.com>
6
7diff --git a/gst-libs/ext/libav/libavcodec/alac.c.old b/gst-libs/ext/libav/libavcodec/alac.c
8index 2a0df8c..bcbd56d 100644
9--- a/gst-libs/ext/libav/libavcodec/alac.c.old
10+++ b/gst-libs/ext/libav/libavcodec/alac.c
11@@ -87,18 +87,44 @@ typedef struct {
12 int wasted_bits;
13 } ALACContext;
14
15-static void allocate_buffers(ALACContext *alac)
16+static av_cold int alac_decode_close(AVCodecContext *avctx)
17+{
18+ ALACContext *alac = avctx->priv_data;
19+
20+ int chan;
21+ for (chan = 0; chan < MAX_CHANNELS; chan++) {
22+ av_freep(&alac->predicterror_buffer[chan]);
23+ av_freep(&alac->outputsamples_buffer[chan]);
24+ av_freep(&alac->wasted_bits_buffer[chan]);
25+ }
26+
27+ return 0;
28+}
29+
30+static int allocate_buffers(ALACContext *alac)
31 {
32 int chan;
33+ int buf_size;
34+