diff options
Diffstat (limited to 'meta/recipes-multimedia')
49 files changed, 1666 insertions, 234 deletions
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 index 41b3c23a40..75a6eb8a3c 100644 --- 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 @@ -1,6 +1,6 @@ -From 2555c5d62229cf269974f6ec6e4689ab97bbda42 Mon Sep 17 00:00:00 2001 +From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001 From: "Hong H. Pham" <hong.pham@windriver.com> -Date: Tue, 26 Feb 2013 19:40:04 -0500 +Date: Fri, 29 Aug 2014 17:13:55 +0300 Subject: [PATCH] Check if wordexp function is supported eglibc could be configured to build without wordexp, so it is not enough @@ -8,24 +8,25 @@ to check if wordexp.h exists (the header file could be installed, but it's possible that the wordexp() function is not supported). An additional check if wordexp() is supported by the system C library is needed. -Upstream-Status: Pending +Upstream-Status: Inappropriate [configuration] Signed-off-by: Hong H. Pham <hong.pham@windriver.com> +Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> --- - configure.in | 5 ++++- - src/userfile.c | 2 +- + configure.ac | 5 ++++- + src/userfile.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) -diff --git a/configure.in b/configure.in -index 4bcb0d6..ba1c2dd 100644 ---- a/configure.in -+++ b/configure.in -@@ -333,7 +333,10 @@ arm*) - esac +diff --git a/configure.ac b/configure.ac +index b8353a0..773b72f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -311,7 +311,10 @@ fi + AC_SUBST(ALSA_DEPLIBS) - dnl Check for wordexp.h --AC_CHECK_HEADERS([wordexp.h]) -+AC_CHECK_HEADERS([wordexp.h], + dnl Check for headers +-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h]) ++AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h], + dnl Make sure wordexp is supported by the C library + AC_CHECK_FUNCS([wordexp]) +) @@ -46,5 +47,5 @@ index 3a73836..b8ce809 100644 #include <assert.h> int snd_user_file(const char *file, char **result) -- -1.7.10.4 +1.9.1 diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch b/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch deleted file mode 100644 index f1a7947c2b..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-lib/Update-iatomic.h-functions-definitions-for-mips.patch +++ /dev/null @@ -1,68 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - -From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001 -From: Kai Kang <jiashuo.kang at gmail.com> -Date: Thu, 15 Aug 2013 17:17:19 +0800 -Subject: [PATCH] Update iatomic.h functions definitions for mips - -Functions atomic_add(s) and atomic_sub(s) are defined with 'extern -__inline__' that may cause compile fails when cross compile for mips. -The error message looks like: - -| pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope': -| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub' - -Replace the 'extern __inline__' with 'static __inline__' to fix this -issue. - -Signed-off-by: Kai Kang <jiashuo.kang at gmail.com> -Signed-off-by: Takashi Iwai <tiwai@suse.de> ---- - include/iatomic.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/iatomic.h b/include/iatomic.h -index 5711fe8..2393297 100644 ---- a/include/iatomic.h -+++ b/include/iatomic.h -@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t; - * Atomically adds @i to @v. Note that the guaranteed useful range - * of an atomic_t is only 24 bits. - */ --extern __inline__ void atomic_add(int i, atomic_t * v) -+static __inline__ void atomic_add(int i, atomic_t * v) - { - unsigned long temp; - -@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v) - * Atomically subtracts @i from @v. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ --extern __inline__ void atomic_sub(int i, atomic_t * v) -+static __inline__ void atomic_sub(int i, atomic_t * v) - { - unsigned long temp; - -@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v) - /* - * Same as above, but return the result value - */ --extern __inline__ int atomic_add_return(int i, atomic_t * v) -+static __inline__ int atomic_add_return(int i, atomic_t * v) - { - unsigned long temp, result; - -@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) - return result; - } - --extern __inline__ int atomic_sub_return(int i, atomic_t * v) -+static __inline__ int atomic_sub_return(int i, atomic_t * v) - { - unsigned long temp, result; - --- -1.8.1.2 - diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb index fc0847d3a2..9a4aab44d4 100644 --- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.27.2.bb +++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.28.bb @@ -14,16 +14,15 @@ BBCLASSEXTEND = "native nativesdk" #FIXME: remove the following ARM_INSTRUCTION_SET = "arm" -SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \ +SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \ file://Check-if-wordexp-function-is-supported.patch \ file://fix-tstamp-declaration.patch \ - file://Update-iatomic.h-functions-definitions-for-mips.patch \ file://0001-pcm-route-Use-get32-for-multi-source-route-calculati.patch \ file://0001-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch \ file://0001-pcm-pcm_local.h-include-time.h-to-enable-CLOCK_MONOT.patch \ " -SRC_URI[md5sum] = "69129a7c37697f81ac092335e9fa452b" -SRC_URI[sha256sum] = "690ed393e7efd4fc7e3a2d2cda5449298ca0c895197e5914e350882012430d19" +SRC_URI[md5sum] = "c9e21b88a2b3e6e12ea7ba0f3b271fc3" +SRC_URI[sha256sum] = "3c074b85dde1b30e78ef4995579765833e5b693fbbd8f834c335e080cb734a6d" inherit autotools pkgconfig @@ -48,7 +47,7 @@ ${datadir}/alsa/pcm/default.conf \ ${datadir}/alsa/pcm/dmix.conf \ ${datadir}/alsa/pcm/dsnoop.conf" -RDEPENDS_libasound = "alsa-conf-base" +RDEPENDS_libasound = "alsa-conf-base alsa-conf" # upgrade path RPROVIDES_${PN}-dev = "alsa-dev" RREPLACES_${PN}-dev = "alsa-dev" diff --git a/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch b/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch deleted file mode 100644 index 09b10f17e6..0000000000 --- a/meta/recipes-multimedia/alsa/alsa-tools/mips_has_no_io_h.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: alsa-tools-1.0.26.1/hda-verb/hda-verb.c -=================================================================== ---- alsa-tools-1.0.26.1.orig/hda-verb/hda-verb.c -+++ alsa-tools-1.0.26.1/hda-verb/hda-verb.c -@@ -13,7 +13,7 @@ - #include <ctype.h> - #include <unistd.h> - #include <sys/ioctl.h> --#ifndef __PPC__ -+#if !(__PPC__ || __mips__) - #include <sys/io.h> - #endif - #include <sys/types.h> diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb index bca7170a28..4b9509e863 100644 --- a/meta/recipes-multimedia/alsa/alsa-tools_1.0.27.bb +++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.28.bb @@ -8,14 +8,13 @@ DEPENDS = "alsa-lib ncurses" LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34" -SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/alsa-tools-${PV}.tar.bz2 \ - file://mips_has_no_io_h.patch \ +SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \ file://autotools.patch \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \ 'file://makefile_no_gtk.patch', d)}" -SRC_URI[md5sum] = "1ea381d00a6069a98613aa7effa4cb51" -SRC_URI[sha256sum] = "6562611b5a6560712f109e09740a9d4fa47296b07ed9590cb44139c5f154ada2" +SRC_URI[md5sum] = "e6c929175d8ee729c06d49b51439bad6" +SRC_URI[sha256sum] = "76e59711c6d0f39cbddce83ce1ed8da00bad112fee021f94fa990d8685cc3761" inherit autotools-brokensep pkgconfig diff --git a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb index 968c81ee2b..968c81ee2b 100644 --- a/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.27.2.bb +++ b/meta/recipes-multimedia/alsa/alsa-utils-alsaconf_1.0.28.bb 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 index 477cd11b12..e99dd515f0 100644 --- 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 @@ -1,35 +1,44 @@ -From 37c99a3cbff36915b56a5703eeaed3c70796f80f Mon Sep 17 00:00:00 2001 +From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> -Date: Sun, 9 Oct 2011 20:06:35 +0200 -Subject: [PATCH] alsactl: don't let systemd unit restore the volume when asound.state is missing +Date: Fri, 29 Aug 2014 18:58:56 +0300 +Subject: [PATCH] alsactl: don't let systemd unit restore the volume when + asound.state is missing This avoids an error on bootup -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> - Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459 Upstream-Status: Pending -Index: alsa-utils-1.0.27.2/alsactl/Makefile.am -=================================================================== ---- alsa-utils-1.0.27.2.orig/alsactl/Makefile.am -+++ alsa-utils-1.0.27.2/alsactl/Makefile.am -@@ -36,8 +36,8 @@ install-data-hook: +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> +--- + alsactl/Makefile.am | 7 ++++--- + alsactl/alsa-restore.service.in | 1 + + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am +index 47f06e9..b728c06 100644 +--- a/alsactl/Makefile.am ++++ b/alsactl/Makefile.am +@@ -43,9 +43,10 @@ install-data-hook: endif edit = \ - $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ +- -e 's,@mydatadir\@,$(mydatadir),g' \ - -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ -+ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' -e 's,@sbindir\@,$(sbindir),g' \ ++ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \ ++ -e 's,@sbindir\@,$(sbindir),g' \ ++ -e 's,@mydatadir\@,$(mydatadir),g' \ + -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ < $< > $@ || rm $@ alsa-state.service: alsa-state.service.in -Index: alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in -=================================================================== ---- alsa-utils-1.0.27.2.orig/alsactl/alsa-restore.service.in -+++ alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in +diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in +index 245a439..b017854 100644 +--- a/alsactl/alsa-restore.service.in ++++ b/alsactl/alsa-restore.service.in @@ -10,6 +10,7 @@ DefaultDependencies=no After=alsa-state.service Before=shutdown.target @@ -38,3 +47,6 @@ Index: alsa-utils-1.0.27.2/alsactl/alsa-restore.service.in [Service] Type=oneshot +-- +1.9.1 + 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 0000000000..5df004aeae --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch @@ -0,0 +1,48 @@ +Upstream-Status: Pending + +aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming +via CTRL-C. Fixed the issue by reverting buggy patches and +properly handling 'in_aborting' flag in appropriate functions. + +Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com> +Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com> + +--- a/aplay/aplay.c 2014-05-19 16:25:14.000000000 +0530 ++++ b/aplay/aplay.c 2014-05-20 15:17:14.364823007 +0530 +@@ -392,14 +392,22 @@ + putchar('\n'); + if (!quiet_mode) + fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig)); +- if (handle) ++ if (stream == SND_PCM_STREAM_CAPTURE) { ++ if (fmt_rec_table[file_type].end) { ++ fmt_rec_table[file_type].end(fd); ++ fd = -1; ++ } ++ stream = -1; ++ } ++ if (fd > 1) { ++ close(fd); ++ fd = -1; ++ } ++ if (handle && sig != SIGABRT) { + snd_pcm_abort(handle); +- if (sig == SIGABRT) { +- /* do not call snd_pcm_close() and abort immediately */ + handle = NULL; +- prg_exit(EXIT_FAILURE); + } +- signal(sig, signal_handler); ++ prg_exit(EXIT_FAILURE); + } + + /* call on SIGUSR1 signal. */ +@@ -2096,7 +2104,7 @@ + ssize_t result = count, r; + size_t size; + +- while (count > 0) { ++ while (count > 0 && !in_aborting) { + size = count; + if (size > chunk_bytes - buffer_pos) + size = chunk_bytes - buffer_pos; diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb index 047fcfe5dd..5f35d76a6e 100644 --- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.27.2.bb +++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.28.bb @@ -13,10 +13,11 @@ PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xm SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \ + file://alsa-utils-aplay-interrupt-signal-handling.patch \ " -SRC_URI[md5sum] = "b65e9a04181bd7c9db7667a4566f8dc3" -SRC_URI[sha256sum] = "02bfac39092f3b68d743c23ad3d688d6c5aa8df69f2ccd692c5b8282edb352ea" +SRC_URI[md5sum] = "361552d5b1cacd0a1e7ba09e69990211" +SRC_URI[sha256sum] = "f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc" # lazy hack. needs proper fixing in gettext.m4, see # http://bugs.openembedded.org/show_bug.cgi?id=2348 diff --git a/meta/recipes-multimedia/flac/flac_1.3.0.bb b/meta/recipes-multimedia/flac/flac_1.3.0.bb index fdf38e9ea9..cf786a473d 100644 --- a/meta/recipes-multimedia/flac/flac_1.3.0.bb +++ b/meta/recipes-multimedia/flac/flac_1.3.0.bb @@ -21,6 +21,8 @@ SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \ SRC_URI[md5sum] = "13b5c214cee8373464d3d65dee362cdd" SRC_URI[sha256sum] = "fa2d64aac1f77e31dfbb270aeb08f5b32e27036a52ad15e69a77e309528010dc" +CLEANBROKEN = "1" + inherit autotools-brokensep gettext EXTRA_OECONF = "--disable-oggtest \ 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 0000000000..3ca6fc4dc5 --- /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 @@ +From c17a0ad1df15a94d0b1239adc2afb593bdf0a153 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michaelni@gmx.at> +Date: Fri, 3 Oct 2014 22:50:45 +0200 +Subject: [PATCH 1/2] avcodec/smc: fix off by 1 error + +Upstream-Status: Backport + +Fixes out of array access +Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov + +Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind +Signed-off-by: Michael Niedermayer <michaelni@gmx.at> +--- + libavcodec/smc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst-libs/ext/libav/libavcodec/smc.c b/gst-libs/ext/libav/libavcodec/smc.c +index 3cd5e53..dec9f71 100644 +--- a/gst-libs/ext/libav/libavcodec/smc.c ++++ b/gst-libs/ext/libav/libavcodec/smc.c +@@ -69,7 +69,7 @@ typedef struct SmcContext { + row_ptr += stride * 4; \ + } \ + total_blocks--; \ +- if (total_blocks < 0) \ ++ if (total_blocks < 0 + !!n_blocks) \ + { \ + av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \ + return; \ +-- +2.1.0 + 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 0000000000..05a9de3334 --- /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 @@ +gst-ffmpeg: h264: set parameters from SPS whenever it changes + +Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with +alternating bit depths. + +Upstream-Status: Backport + +Signed-off-by: Yue Tao <yue.tao@windriver.com> + +diff --git a/gst-libs/ext/libav/libavcodec/h264.c.old b/gst-libs/ext/libav/libavcodec/h264.c +index 3621f41..718906a 100644 +--- a/gst-libs/ext/libav/libavcodec/h264.c.old ++++ b/gst-libs/ext/libav/libavcodec/h264.c +@@ -2491,6 +2491,34 @@ int ff_h264_get_profile(SPS *sps) + return profile; + } + ++static int h264_set_parameter_from_sps(H264Context *h) ++{ ++ MpegEncContext *s = &h->s; ++ AVCodecContext * avctx= s->avctx; ++ ++ if (s->flags& CODEC_FLAG_LOW_DELAY || ++ (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames)) ++ s->low_delay=1; ++ ++ if(avctx->has_b_frames < 2) ++ avctx->has_b_frames= !s->low_delay; ++ ++ if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) { ++ if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) { ++ avctx->bits_per_raw_sample = h->sps.bit_depth_luma; ++ h->pixel_shift = h->sps.bit_depth_luma > 8; ++ ++ ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma); ++ ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma); ++ dsputil_init(&s->dsp, s->avctx); ++ } else { ++ av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma); ++ return -1; ++ } ++ } ++ return 0; ++} ++ + /** + * decodes a slice header. + * This will also call MPV_common_init() and frame_start() as needed. +@@ -2505,7 +2533,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ + MpegEncContext * const s0 = &h0->s; + unsigned int first_mb_in_slice; + unsigned int pps_id; +- int num_ref_idx_active_override_flag; ++ int num_ref_idx_active_override_flag, ret; + unsigned int slice_type, tmp, i, j; + int default_ref_list_done = 0; + int last_pic_structure; +@@ -2569,7 +2597,17 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ + av_log(h->s.avctx, AV_LOG_ERROR, "non-existing SPS %u referenced\n", h->pps.sps_id); + return -1; + } +- h->sps = *h0->sps_buffers[h->pps.sps_id]; ++ ++ if (h->pps.sps_id != h->current_sps_id || ++ h0->sps_buffers[h->pps.sps_id]->new) { ++ h0->sps_buffers[h->pps.sps_id]->new = 0; ++ ++ h->current_sps_id = h->pps.sps_id; ++ h->sps = *h0->sps_buffers[h->pps.sps_id]; ++ ++ if ((ret = h264_set_parameter_from_sps(h)) < 0) ++ return ret; ++ } + + s->avctx->profile = ff_h264_get_profile(&h->sps); + s->avctx->level = h->sps.level_idc; +@@ -3811,26 +3811,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ + case NAL_SPS: + init_get_bits(&s->gb, ptr, bit_length); + ff_h264_decode_seq_parameter_set(h); +- +- if (s->flags& CODEC_FLAG_LOW_DELAY || +- (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames)) +- s->low_delay=1; +- +- if(avctx->has_b_frames < 2) +- avctx->has_b_frames= !s->low_delay; +- +- if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma) { +- if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) { +- avctx->bits_per_raw_sample = h->sps.bit_depth_luma; +- h->pixel_shift = h->sps.bit_depth_luma > 8; +- +- ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma); +- ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma); +- dsputil_init(&s->dsp, s->avctx); +- } else { +- av_log(avctx, AV_LOG_DEBUG, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma); +- return -1; +- } ++ if (h264_set_parameter_from_sps(h) < 0) { ++ return -1; + } + break; + case NAL_PPS: +diff --git a/gst-libs/ext/libav/libavcodec/h264.h.old b/gst-libs/ext/libav/libavcodec/h264.h +index e3cc815..b77ad98 100644 +--- a/gst-libs/ext/libav/libavcodec/h264.h.old ++++ b/gst-libs/ext/libav/libavcodec/h264.h +@@ -202,6 +202,7 @@ typedef struct SPS{ + int bit_depth_chroma; ///< bit_depth_chroma_minus8 + 8 + int residual_color_transform_flag; ///< residual_colour_transform_flag + int constraint_set_flags; ///< constraint_set[0-3]_flag ++ int new; ///< flag to keep track if the decoder context needs re-init due to changed SPS + }SPS; + + /** +@@ -333,6 +334,7 @@ typedef struct H264Context{ + int emu_edge_width; + int emu_edge_height; + ++ unsigned current_sps_id; ///< id of the current SPS + SPS sps; ///< current sps + + /** +diff --git a/gst-libs/ext/libav/libavcodec/h264_ps.c.old b/gst-libs/ext/libav/libavcodec/h264_ps.c +index 7491807..0929098 100644 +--- a/gst-libs/ext/libav/libavcodec/h264_ps.c.old ++++ b/gst-libs/ext/libav/libavcodec/h264_ps.c +@@ -438,10 +438,13 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){ + sps->timing_info_present_flag ? sps->time_scale : 0 + ); + } ++ sps->new = 1; + + av_free(h->sps_buffers[sps_id]); +- h->sps_buffers[sps_id]= sps; +- h->sps = *sps; ++ h->sps_buffers[sps_id] = sps; ++ h->sps = *sps; ++ h->current_sps_id = sps_id; ++ + return 0; + fail: + 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 0000000000..5d45c1a96c --- /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 @@ +gst-ffmpeg: h264: skip error concealment when SPS and slices are + mismatching + +Fixes out of array accesses + +Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind +Signed-off-by: Michael Niedermayer <michaelni@gmx.at> +(cherry picked from commit 695af8eed642ff0104834495652d1ee784a4c14d) + +Upstream-Status: Backport + +Signed-off-by: Michael Niedermayer <michaelni@gmx.at> +Signed-off-by: Yue Tao <yue.tao@windriver.com> +--- + libavcodec/h264.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libavcodec/h264.c b/libavcodec/h264.c +index da144db..0aab4e7 100644 +--- a/gst-libs/ext/libav/libavcodec/h264.c ++++ b/gst-libs/ext/libav/libavcodec/h264.c +@@ -2351,7 +2351,7 @@ static int field_end(H264Context *h, int in_setup) + * past end by one (callers fault) and resync_mb_y != 0 + * causes problems for the first MB line, too. + */ +- if (!FIELD_PICTURE) ++ if (!FIELD_PICTURE && h->current_slice && !h->sps.new) + ff_er_frame_end(s); + + ff_MPV_frame_end(s); +-- +1.7.5.4 + 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 0000000000..c8bafd570e --- /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 @@ +From 6043c431c97d55173f339fafbd033d3c0642e2e9 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <michaelni@gmx.at> +Date: Fri, 3 Oct 2014 01:50:27 +0200 +Subject: [PATCH 2/2] avcodec/mjpegdec: check bits per pixel for changes + similar to dimensions + +Upstream-Status: Backport + +Fixes out of array accesses +Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi + +Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind +Signed-off-by: Michael Niedermayer <michaelni@gmx.at> + +Conflicts: + libavcodec/mjpegdec.c +--- + libavcodec/mjpegdec.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/gst-libs/ext/libav/libavcodec/mjpegdec.c b/gst-libs/ext/libav/libavcodec/mjpegdec.c +index 84343c0..c0137d8 100644 +--- a/gst-libs/ext/libav/libavcodec/mjpegdec.c ++++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c +@@ -210,16 +210,16 @@ int ff_mjpeg_decode_dht(MJpegDecodeContext *s) + + int ff_mjpeg_decode_sof(MJpegDecodeContext *s) + { +- int len, nb_components, i, width, height, pix_fmt_id; ++ int len, nb_components, i, bits, width, height, pix_fmt_id; + + /* XXX: verify len field validity */ + len = get_bits(&s->gb, 16); +- s->bits= get_bits(&s->gb, 8); ++ bits= get_bits(&s->gb, 8); + +- if(s->pegasus_rct) s->bits=9; +- if(s->bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly ++ if(s->pegasus_rct) bits=9; ++ if(bits==9 && !s->pegasus_rct) s->rct=1; //FIXME ugly + +- if (s->bits != 8 && !s->lossless){ ++ if (bits != 8 && !s->lossless){ + av_log(s->avctx, AV_LOG_ERROR, "only 8 bits/component accepted\n"); + return -1; + } +@@ -239,7 +239,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) + if (nb_components <= 0 || + nb_components > MAX_COMPONENTS) + return -1; +- if (s->ls && !(s->bits <= 8 || nb_components == 1)){ ++ if (s->ls && !(bits <= 8 || nb_components == 1)){ + av_log(s->avctx, AV_LOG_ERROR, "only <= 8 bits/component or 16-bit gray accepted for JPEG-LS\n"); + return -1; + } +@@ -272,10 +272,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) + + /* if different size, realloc/alloc picture */ + /* XXX: also check h_count and v_count */ +- if (width != s->width || height != s->height) { ++ if (width != s->width || height != s->height || bits != s->bits) { + av_freep(&s->qscale_table); + + s->width = width; ++ s->bits= bits; + s->height = height; + s->interlaced = 0; + diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb index bbe3308b03..30e5deb1f9 100644 --- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb @@ -53,6 +53,10 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0001-qdm2-check-array-index-before-use-fix-out-of-array-a.patch \ file://0001-lavf-compute-probe-buffer-size-more-reliably.patch \ file://0001-ffserver-set-oformat.patch \ + file://0001-h264-set-parameters-from-SPS-whenever-it-changes.patch \ + file://0001-h264-skip-error-concealment-when-SPS-and-slices-are-.patch \ + file://0001-avcodec-smc-fix-off-by-1-error.patch \ + file://0002-avcodec-mjpegdec-check-bits-per-pixel-for-changes-si.patch \ ${@bb.utils.contains('PACKAGECONFIG', 'libav9', 'file://libav-9.patch', '', d)} \ " diff --git a/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb index 518ab721af..039abe14fa 100644 --- a/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +++ b/meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb @@ -1,6 +1,11 @@ SUMMARY = "GStreamer package groups" LICENSE = "MIT" -DEPENDS = "gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad" + +COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}" +DEPENDS_UGLY="${@'gst-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}" +DEPENDS_BAD="${@'gst-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}" +DEPENDS = "gstreamer gst-plugins-base gst-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}" + LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb index 2ecdcf25ce..0f64871497 100644 --- a/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-bad_0.10.23.bb @@ -37,6 +37,7 @@ PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft" PACKAGECONFIG[schro] = "--enable-schro,--disable-schro,schroedinger" PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394" PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac" +PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump" ARM_INSTRUCTION_SET = "arm" diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch b/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch new file mode 100644 index 0000000000..52142562ab --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-base-0.10.36/audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch @@ -0,0 +1,37 @@ +audioresample: Fix build on x86 if emmintrin.h is available but can't be used + +On x86, EMMINTRIN is defined but not usable without SSE so check for +__SSE__ and __SSE2__ as well. + +https://bugzilla.gnome.org/show_bug.cgi?id=670690 + +Upstream-Status: Backport + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + gst/audioresample/resample.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c +index 98d006c..481fa01 100644 +--- a/gst/audioresample/resample.c ++++ b/gst/audioresample/resample.c +@@ -77,13 +77,13 @@ + #define EXPORT G_GNUC_INTERNAL + + #ifdef _USE_SSE +-#ifndef HAVE_XMMINTRIN_H ++#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H) + #undef _USE_SSE + #endif + #endif + + #ifdef _USE_SSE2 +-#ifndef HAVE_EMMINTRIN_H ++#if !defined(__SSE2__) || !defined(HAVE_EMMINTRIN_H) + #undef _USE_SSE2 + #endif + #endif +-- +1.7.1 + diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb index 4a8a9947a7..c8a949973d 100644 --- a/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-base_0.10.36.bb @@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ DEPENDS += "alsa-lib liboil libogg libvorbis libtheora util-linux tremor glib-2.0-native" SRC_URI += "file://gst-plugins-base-tremor.patch \ - file://configure.ac-fix-subparse-plugin.patch" + file://configure.ac-fix-subparse-plugin.patch \ + file://audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch \ +" SRC_URI[md5sum] = "776c73883e567f67b9c4a2847d8d041a" SRC_URI[sha256sum] = "2cd3b0fa8e9b595db8f514ef7c2bdbcd639a0d63d154c00f8c9b609321f49976" diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc index 0503b34ea3..7bb567866f 100644 --- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc @@ -50,6 +50,8 @@ ALLOW_EMPTY_${PN}-staticdev = "1" PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib" FILES_${PN}-apps = "${bindir}" +RDEPENDS_${PN}-apps += "perl" + FILES_${PN} = "${datadir}/gstreamer-${LIBV}" FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug" FILES_${PN}-glib = "${datadir}/glib-2.0" diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins.inc b/meta/recipes-multimedia/gstreamer/gst-plugins.inc index 26976092d6..c852c53fa9 100644 --- a/meta/recipes-multimedia/gstreamer/gst-plugins.inc +++ b/meta/recipes-multimedia/gstreamer/gst-plugins.inc @@ -19,10 +19,10 @@ require gst-plugins-package.inc PACKAGES_DYNAMIC += "^${PN}-.*" # apply gstreamer hack after Makefile.in.in in source is replaced by our version from -# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed +# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed # http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/032233.html -oe_runconf_prepend() { +oe_runconf_prepend() { if [ -e ${S}/po/Makefile.in.in ]; then sed -i -e "1a\\" -e 'GETTEXT_PACKAGE = @GETTEXT_PACKAGE@' ${S}/po/Makefile.in.in fi -} +} diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.1.bb index bc79d54f5f..f962ff0608 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.0.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.1.bb @@ -13,12 +13,13 @@ SRC_URI = " \ http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ " -SRC_URI[md5sum] = "60811ae08c26fa093a96996582962c75" -SRC_URI[sha256sum] = "c82c7a657863f2e27ac5cba539b0bd0a8114ad6bd4ba33bae777e4dbfab9e380" +SRC_URI[md5sum] = "ea2d636c24d7c5ae123967ef22e37c07" +SRC_URI[sha256sum] = "fc125521187fa84f3210269a0eecc51f8a856802f1ca4bb251f118dab90c5a9d" LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \ --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \ --ranlib='${RANLIB}' \ - ${GSTREAMER_1_0_DEBUG}" + ${GSTREAMER_1_0_DEBUG} \ + --cross-prefix='${HOST_PREFIX}'" S = "${WORKDIR}/gst-libav-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb index 5ce28ccbe7..bf1b87e6de 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb @@ -18,10 +18,12 @@ SRCREV = "127202d6f65584891dabf92be031f0d170b0e7f1" LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \ --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \ - ${GSTREAMER_1_0_DEBUG}" + ${GSTREAMER_1_0_DEBUG} \ + --cross-prefix='${HOST_PREFIX}'" -do_configure() { +do_configure_prepend() { + cd ${S} ./autogen.sh --noconfigure - oe_runconf + cd ${B} } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb index a703d9b7a4..3ef10c3723 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb @@ -3,7 +3,10 @@ LICENSE = "MIT" inherit packagegroup -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad" +COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}" +DEPENDS_UGLY="${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}" +DEPENDS_BAD="${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}" +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}" PACKAGES = "\ gstreamer1.0-meta-base \ diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc index b4238634fc..d698904349 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc @@ -3,7 +3,7 @@ SECTION = "multimedia" LICENSE = "LGPLv2.1" LICENSE_FLAGS = "commercial" HOMEPAGE = "http://www.gstreamer.net/" -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" RDEPENDS_${PN} = "libomxil" inherit autotools pkgconfig gettext diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb index a390205621..931a7fcc96 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb @@ -13,8 +13,9 @@ S = "${WORKDIR}/git" SRCREV = "a2db76b048db278ef0aa798e106b7594264e06c0" -do_configure() { +do_configure_prepend() { + cd ${S} ./autogen.sh --noconfigure - oe_runconf + cd ${B} } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc index 8ecc2aac12..9c15f2b1ed 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc @@ -2,25 +2,33 @@ require gstreamer1.0-plugins.inc LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+ " -DEPENDS += "gstreamer1.0-plugins-base bzip2" +DEPENDS += "gstreamer1.0-plugins-base bzip2 libpng jpeg" S = "${WORKDIR}/gst-plugins-bad-${PV}" +SRC_URI += "file://configure-allow-to-disable-libssh2.patch \ + " + inherit gettext +# opengl packageconfig factored out to make it easy for distros +# and BSP layers to pick either (desktop) opengl, gles2, or no GL +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}" PACKAGECONFIG ??= " \ + ${PACKAGECONFIG_GL} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \ orc curl uvch264 neon sndfile \ hls sbc dash bz2 smoothstreaming \ " + # dash = Dynamic Adaptive Streaming over HTTP PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass" PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" -PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,virtual/egl virtual/libgles2" +PACKAGECONFIG[gles2] = "--enable-gles2 --enable-egl,--disable-gles2 --disable-egl,virtual/libgles2 virtual/egl" +PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu" PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac" PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2" PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms" @@ -45,6 +53,8 @@ PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,bluez4" PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg" PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1" PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" +PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump" +PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2" # these plugins have not been ported to 1.0 (yet): # directdraw vcd apexsink dc1394 lv2 linsys musepack mythtv @@ -70,6 +80,7 @@ EXTRA_OECONF += " \ --disable-apple_media \ --disable-avc \ --disable-chromaprint \ + --disable-cocoa \ --disable-daala \ --disable-dc1394 \ --disable-direct3d \ @@ -96,7 +107,6 @@ EXTRA_OECONF += " \ --disable-pvr \ --disable-quicktime \ --disable-resindvd \ - --disable-rtmp \ --disable-sdl \ --disable-sdltest \ --disable-sndio \ @@ -121,3 +131,5 @@ EXTRA_OECONF += " \ ARM_INSTRUCTION_SET = "arm" +FILES_gstreamer1.0-plugins-bad-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch new file mode 100644 index 0000000000..042a32c04d --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch @@ -0,0 +1,41 @@ +From deba0da45ec821209a7ed148a4521d562e6512cd Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani <dv@pseudoterminal.org> +Date: Wed, 27 Aug 2014 14:47:25 +0200 +Subject: [PATCH] gl: do not check for GL/GLU/EGL/GLES2 libs if disabled in + configuration + +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=735522] + +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> +--- + configure.ac | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1a46afb..e85d4ba 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -661,10 +661,16 @@ case $host in + fi + ;; + *) +- AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h) +- AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h) +- AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h) +- AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h) ++ if test "x$NEED_GL" != "xno"; then ++ AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h) ++ AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h) ++ fi ++ if test "x$NEED_GLES2" != "xno"; then ++ AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h) ++ fi ++ if test "x$NEED_EGL" != "xno"; then ++ AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h) ++ fi + + old_LIBS=$LIBS + old_CFLAGS=$CFLAGS +-- +1.8.3.2 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch new file mode 100644 index 0000000000..d52afd5d57 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch @@ -0,0 +1,64 @@ +From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001 +From: Wenzong Fan <wenzong.fan@windriver.com> +Date: Thu, 18 Sep 2014 02:24:07 -0400 +Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2 + +libssh2 is automatically linked to if present, this undetermined +dependency may cause build errors like: + + .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2 + +libssh2 isn't an oe-core recipe, so allow to disable it from +configure. + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> +--- + configure.ac | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0e95c5c..12153b4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1901,6 +1901,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chromaprint], chromaprint, [ + ]) + + dnl *** Curl *** ++AC_ARG_ENABLE([libssh2], ++ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@], ++ [case "${enableval}" in ++ yes) NEED_SSH2=yes ;; ++ no) NEED_SSH2=no ;; ++ auto) NEED_SSH2=auto ;; ++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;; ++ esac],[NEED_SSH2=auto]) ++ + translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true) + AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ + PKG_CHECK_MODULES(CURL, libcurl >= 7.21.0, [ +@@ -1915,12 +1924,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ + ]) + AC_SUBST(CURL_CFLAGS) + AC_SUBST(CURL_LIBS) +- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ +- HAVE_SSH2="yes" +- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) +- ], [ +- HAVE_SSH2="no" +- ]) ++ if test "x$NEED_SSH2" != "xno"; then ++ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ ++ HAVE_SSH2="yes" ++ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) ++ ], [ ++ HAVE_SSH2="no" ++ ]) ++ fi + AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes") + AC_SUBST(SSH2_CFLAGS) + AC_SUBST(SSH2_LIBS) +-- +1.7.9.5 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.1.bb index e6edb26736..f0116c08a1 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.0.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.1.bb @@ -4,7 +4,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \ file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \ file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50" -SRC_URI[md5sum] = "3bc0fcfe8d16ad1295f0454c1fcb4ba3" -SRC_URI[sha256sum] = "ff2cb754f7725b205aec66002b1406e440f3a03194b6cad2d126ef5cd00902f9" + +SRC_URI += "file://0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch" + +SRC_URI[md5sum] = "20cb190b18dc63017326321cdb7c91e5" +SRC_URI[sha256sum] = "0268db2faaf0bb22e5b709a11633abbca4f3d289b1f513bb262d0bf3f53e19ae" S = "${WORKDIR}/gst-plugins-bad-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb index e1a5904abf..75859f9a89 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb @@ -19,8 +19,9 @@ EXTRA_OECONF += " \ -disable-openjpeg \ " -do_configure() { +do_configure_prepend() { + cd ${S} ./autogen.sh --noconfigure - oe_runconf + cd ${B} } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.1.bb index 968f0924b7..0db42cec94 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.0.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.1.bb @@ -9,6 +9,6 @@ SRC_URI += "file://do-not-change-eos-event-to-gap-event-if.patch \ file://get-caps-from-src-pad-when-query-caps.patch \ " -SRC_URI[md5sum] = "1ff06280b03b9098a706d1290d8bb3bd" -SRC_URI[sha256sum] = "5daed4b983b64e4e3fbe9cd29063e4302812cd03ba685a15b06a790911d04c1e" +SRC_URI[md5sum] = "a825628225bd0a58c0df87cdd2a5db91" +SRC_URI[sha256sum] = "aea9e25be6691bd3cc0785d005b2b5d70ce313a2c897901680a3f7e7cab5a499" S = "${WORKDIR}/gst-plugins-base-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb index a894abe501..fbe3a42cd7 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb @@ -11,8 +11,9 @@ S = "${WORKDIR}/git" SRCREV = "8d4cb64a4b9d84b10076bf350f80a0d6ea68ec2d" -do_configure() { +do_configure_prepend() { + cd ${S} ./autogen.sh --noconfigure - oe_runconf + cd ${B} } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.1.bb index 2d392c607e..441dd51e39 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.0.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.1.bb @@ -6,8 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ SRC_URI += "file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \ " - -SRC_URI[md5sum] = "8007d57a38f6b2882961b2547fa4597c" -SRC_URI[sha256sum] = "48a62e7987fffa289a091dfc8ccc80b401d110632b8fc1adce5b82fc092f2685" +SRC_URI[md5sum] = "eb3a3296b2f6009def1f5a09590ce767" +SRC_URI[sha256sum] = "8559d4270065b30ed5c49b826e1b7a3a2bd5ee9a340ae745a2ae3f9718e4c637" S = "${WORKDIR}/gst-plugins-good-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb index 8b11b20b1b..2c0e0efe68 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb @@ -10,8 +10,9 @@ S = "${WORKDIR}/git" SRCREV = "fd0123800c8c1cf1468c0fa5d592ad0d0d8b4140" -do_configure() { +do_configure_prepend() { + cd ${S} ./autogen.sh --noconfigure - oe_runconf + cd ${B} } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.1.bb index 9035d2dfbe..6d63ba62d4 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.0.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.1.bb @@ -2,7 +2,7 @@ include gstreamer1.0-plugins-ugly.inc LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 " -SRC_URI[md5sum] = "558146cb5ec8b313afe2113aafc3da85" -SRC_URI[sha256sum] = "5314bb60f13d1a7b9c6317df73813af5f3f15a62c7c186b816b0024b5c61744d" +SRC_URI[md5sum] = "316974af949ca4654efee704a0164076" +SRC_URI[sha256sum] = "25440435ac4ed795d213f2420a0e7355e4a2e2e76d1f9d020b2073f815e8b071" S = "${WORKDIR}/gst-plugins-ugly-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb index 2f72497363..dcf5ffc3c1 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb @@ -9,8 +9,9 @@ S = "${WORKDIR}/git" SRCREV = "06b8ac10cee85c5c304ca320997aa8f44295a66f" -do_configure() { +do_configure_prepend() { + cd ${S} ./autogen.sh --noconfigure - oe_runconf + cd ${B} } diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.0.bb deleted file mode 100644 index 66aa8862c0..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.0.bb +++ /dev/null @@ -1,6 +0,0 @@ -include gstreamer1.0-rtsp-server.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" - -SRC_URI[md5sum] = "974af05dbf867cade89b8d3101e3f197" -SRC_URI[sha256sum] = "800a93ee6de8ca3946fbb2fa3878e41af44e27dde76c9399e30b93ba3e0bffe8" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.1.bb new file mode 100644 index 0000000000..1f34be0e8f --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.1.bb @@ -0,0 +1,6 @@ +include gstreamer1.0-rtsp-server.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" + +SRC_URI[md5sum] = "e39f8643eb363611c342d87088a29aa0" +SRC_URI[sha256sum] = "10aeacc774e99d81607aeb2748c0a1c6736425b8ae3a9caf8db3cd0c4a08d06e" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.0.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.1.bb index a958064e17..56fc4f2083 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.0.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.1.bb @@ -7,8 +7,7 @@ SRC_URI = " \ http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ file://0001-Fix-crash-with-gst-inspect.patch \ " - -SRC_URI[md5sum] = "594c0c06eaace9b9d3bad010de1bdfae" -SRC_URI[sha256sum] = "23c39fdc2b24f889b07cab0449825384fef7592a121e180729fd9025ec45c695" +SRC_URI[md5sum] = "bd0938d680d657249b885162f310702d" +SRC_URI[sha256sum] = "5638f75003282135815c0077d491da11e9a884ad91d4ba6ab3cc78bae0fb452e" S = "${WORKDIR}/gstreamer-${PV}" diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb index 424c90a9e8..cb00d319a7 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb @@ -10,8 +10,9 @@ S = "${WORKDIR}/git" SRCREV = "3b8181a8c550e74acaba4e8c55bdc649fa551dc9" -do_configure() { +do_configure_prepend() { + cd ${S} ./autogen.sh --noconfigure - oe_runconf + cd ${B} } diff --git a/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch b/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch deleted file mode 100644 index bbbca89e8f..0000000000 --- a/meta/recipes-multimedia/libpng/libpng/0001-configure-lower-automake-requirement.patch +++ /dev/null @@ -1,31 +0,0 @@ -From fff7cbc01e061a235852f385866fe75fb17867e3 Mon Sep 17 00:00:00 2001 -From: Valentin Popa <valentin.popa@intel.com> -Date: Tue, 26 Nov 2013 12:06:55 +0200 -Subject: [PATCH] configure: lower automake requirement - -We're not using parallel tests in OE-core yet - -Signed-off-by: Valentin Popa <valentin.popa@intel.com> -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> - -Upstream-Status: Inapropriate [OE specific build hack] ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 28200c3..fab2515 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -27,7 +27,7 @@ AC_CONFIG_MACRO_DIR([scripts]) - # dist-xz requires automake 1.11 or later - # 1.12.2 fixes a security issue in 1.11.2 and 1.12.1 - # 1.13 is required for parallel tests --AM_INIT_AUTOMAKE([1.13 foreign dist-xz color-tests silent-rules subdir-objects]) -+AM_INIT_AUTOMAKE([1.12.2 foreign dist-xz color-tests silent-rules subdir-objects]) - # The following line causes --disable-maintainer-mode to be the default to - # configure, this is necessary because libpng distributions cannot rely on the - # time stamps of the autotools generated files being correct --- -1.8.3.2 - diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.10.bb b/meta/recipes-multimedia/libpng/libpng_1.6.10.bb deleted file mode 100644 index babf87e392..0000000000 --- a/meta/recipes-multimedia/libpng/libpng_1.6.10.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "PNG image format decoding library" -HOMEPAGE = "http://www.libpng.org/" -SECTION = "libs" -LICENSE = "Libpng" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cb7a834ba2891bc30b8577e49963a435 \ - file://png.h;endline=15;md5=853b11c4a19ec66decd641efd756bc2c \ - file://png.h;beginline=209;endline=323;md5=cface34a7db6b71eaa828fe934951f81" -DEPENDS = "zlib" -LIBV = "16" - -SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \ - file://0001-configure-lower-automake-requirement.patch \ - " - -SRC_URI[md5sum] = "5f414b20f683b1d96b163c89e3eff768" -SRC_URI[sha256sum] = "4003f0fd0e36110a2b742fc5b9e1ab93ed7a7ab57ae8dc65f0e8101458775a56" - -BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" - -inherit autotools binconfig-disabled pkgconfig - -# Work around missing symbols -EXTRA_OECONF_append_arm = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" - -PACKAGES =+ "${PN}-tools" - -FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.13.bb b/meta/recipes-multimedia/libpng/libpng_1.6.13.bb new file mode 100644 index 0000000000..2c6260a9a1 --- /dev/null +++ b/meta/recipes-multimedia/libpng/libpng_1.6.13.bb @@ -0,0 +1,28 @@ +SUMMARY = "PNG image format decoding library" +HOMEPAGE = "http://www.libpng.org/" +SECTION = "libs" +LICENSE = "Libpng" +LIC_FILES_CHKSUM = "file://LICENSE;md5=46401ee4b225b9ec066cb96cf1025c0f \ + file://png.h;endline=15;md5=8167a17735fc618d1df109f8b0f839a6 \ + file://png.h;beginline=229;endline=343;md5=5cdf8564a14e2f00339e4437a83b4913" +DEPENDS = "zlib" +LIBV = "16" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/${PV}/libpng-${PV}.tar.xz \ + " + +SRC_URI[md5sum] = "9822c25466f060142359f80ed142c9e5" +SRC_URI[sha256sum] = "d9c8ce54a5fc8052ed794ca65b553384a74c0608b09ae163cbbb07176018e625" + +BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" + +inherit autotools binconfig-disabled pkgconfig + +# Work around missing symbols +EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" + +PACKAGES =+ "${PN}-tools" + +FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch b/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch new file mode 100644 index 0000000000..fc4adb59d8 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2013-1961.patch @@ -0,0 +1,786 @@ +libtiff: fix CVE-2013-1961. + +Upstream-Status: Backported + +Issue Description: CVE-2013-1961 +Stack-based buffer overflow in the t2p_write_pdf_page function in tiff2pdf +in libtiff before 4.0.3 allows remote attackers to cause a denial of service +(application crash) via a crafted image length and resolution in a TIFF image file. + +Fix Description: Replace sprintf with snprintf + +Signed-off-by: Priyanka Shobhan <priyanka_shobhan@mentor.com> +--- + +diff --git a/contrib/dbs/xtiff/xtiff.c b/contrib/dbs/xtiff/xtiff.c +index 2634030..97e4ffe 100644 +--- a/contrib/dbs/xtiff/xtiff.c ++++ b/contrib/dbs/xtiff/xtiff.c +@@ -512,9 +512,9 @@ SetNameLabel() + Arg args[1]; + + if (tfMultiPage) +- sprintf(buffer, "%s - page %d", fileName, tfDirectory); ++ snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory); + else +- strcpy(buffer, fileName); ++ snprintf(buffer, sizeof(buffer), "%s", fileName); + XtSetArg(args[0], XtNlabel, buffer); + XtSetValues(labelWidget, args, 1); + } +diff --git a/libtiff/tif_codec.c b/libtiff/tif_codec.c +index e201667..703e87d 100644 +--- a/libtiff/tif_codec.c ++++ b/libtiff/tif_codec.c +@@ -108,7 +108,8 @@ _notConfigured(TIFF* tif) + const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression); + char compression_code[20]; + +- sprintf( compression_code, "%d", tif->tif_dir.td_compression ); ++ snprintf(compression_code, sizeof(compression_code), "%d", ++ tif->tif_dir.td_compression ); + TIFFErrorExt(tif->tif_clientdata, tif->tif_name, + "%s compression support is not configured", + c ? c->name : compression_code ); +diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c +index d319931..4dae5e5 100644 +--- a/libtiff/tif_dirinfo.c ++++ b/libtiff/tif_dirinfo.c +@@ -711,7 +711,7 @@ _TIFFCreateAnonField(TIFF *tif, uint32 tag, TIFFDataType field_type) + * note that this name is a special sign to TIFFClose() and + * _TIFFSetupFields() to free the field + */ +- sprintf(fld->field_name, "Tag %d", (int) tag); ++ snprintf(fld->field_name, 32, "Tag %d", (int) tag); + + return fld; + } +diff --git a/tools/rgb2ycbcr.c b/tools/rgb2ycbcr.c +index 162aac1..a3eeb03 100644 +--- a/tools/rgb2ycbcr.c ++++ b/tools/rgb2ycbcr.c +@@ -332,7 +332,8 @@ tiffcvt(TIFF* in, TIFF* out) + TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + { char buf[2048]; + char *cp = strrchr(TIFFFileName(in), '/'); +- sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in)); ++ snprintf(buf, sizeof(buf), "YCbCr conversion of %s", ++ cp ? cp+1 : TIFFFileName(in)); + TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf); + } + TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion()); +diff --git a/tools/tiff2bw.c b/tools/tiff2bw.c +index bda754a..7ffaca0 100644 +--- a/tools/tiff2bw.c ++++ b/tools/tiff2bw.c +@@ -205,7 +205,7 @@ main(int argc, char* argv[]) + } + } + TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); +- sprintf(thing, "B&W version of %s", argv[optind]); ++ snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]); + TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); + TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw"); + outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out)); +diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c +index 356328c..957fd9f 100644 +--- a/tools/tiff2pdf.c ++++ b/tools/tiff2pdf.c +@@ -3609,7 +3609,9 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){ + char buffer[16]; + int buflen=0; + +- buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff); ++ buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ", ++ t2p->pdf_majorversion&0xff, ++ t2p->pdf_minorversion&0xff); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7); + +@@ -3623,10 +3625,10 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){ + tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + +- buflen=sprintf(buffer, "%lu", (unsigned long)number); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number); + written += t2pWriteFile(output, (tdata_t) buffer, buflen ); + written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7); + +@@ -3665,13 +3667,13 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){ + written += t2pWriteFile(output, (tdata_t) "/", 1); + for (i=0;i<namelen;i++){ + if ( ((unsigned char)name[i]) < 0x21){ +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + nextchar=1; + } + if ( ((unsigned char)name[i]) > 0x7E){ +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + nextchar=1; +@@ -3679,57 +3681,57 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){ + if (nextchar==0){ + switch (name[i]){ + case 0x23: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x25: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x28: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x29: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x2F: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x3C: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x3E: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x5B: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x5D: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x7B: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; + case 0x7D: +- sprintf(buffer, "#%.2X", name[i]); ++ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]); + buffer[sizeof(buffer) - 1] = '\0'; + written += t2pWriteFile(output, (tdata_t) buffer, 3); + break; +@@ -3844,14 +3846,14 @@ tsize_t t2p_write_pdf_stream_end(TIFF* output){ + tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + + written += t2pWriteFile(output, (tdata_t) "/Length ", 8); + if(len!=0){ + written += t2p_write_pdf_stream_length(len, output); + } else { +- buflen=sprintf(buffer, "%lu", (unsigned long)number); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); + } +@@ -3892,10 +3894,10 @@ tsize_t t2p_write_pdf_stream_dict_end(TIFF* output){ + tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + +- buflen=sprintf(buffer, "%lu", (unsigned long)len); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "\n", 1); + +@@ -3909,7 +3911,7 @@ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){ + tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output) + { + tsize_t written = 0; +- char buffer[16]; ++ char buffer[32]; + int buflen = 0; + + written += t2pWriteFile(output, +@@ -3948,7 +3950,6 @@ tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output) + written += t2p_write_pdf_string(t2p->pdf_datetime, output); + } + written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11); +- _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer)); + snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION); + written += t2p_write_pdf_string(buffer, output); + written += t2pWriteFile(output, (tdata_t) "\n", 1); +@@ -4089,7 +4090,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output) + { + tsize_t written=0; + tdir_t i=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + + int page=0; +@@ -4097,7 +4098,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output) + (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26); + page = t2p->pdf_pages+1; + for (i=0;i<t2p->tiff_pagecount;i++){ +- buflen=sprintf(buffer, "%d", page); ++ buflen=snprintf(buffer, sizeof(buffer), "%d", page); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); + if ( ((i+1)%8)==0 ) { +@@ -4112,8 +4113,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output) + } + } + written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10); +- _TIFFmemset(buffer, 0x00, 16); +- buflen=sprintf(buffer, "%d", t2p->tiff_pagecount); ++ buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6); + +@@ -4128,28 +4128,28 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ + + unsigned int i=0; + tsize_t written=0; +- char buffer[16]; ++ char buffer[256]; + int buflen=0; + + written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24); +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); + written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11); +- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1); ++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " ", 1); +- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1); ++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " ", 1); +- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2); ++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " ", 1); +- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2); ++ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "] \n", 3); + written += t2pWriteFile(output, (tdata_t) "/Contents ", 10); +- buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1)); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6); + written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15); +@@ -4157,15 +4157,13 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ + written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12); + for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){ + written += t2pWriteFile(output, (tdata_t) "/Im", 3); +- buflen = sprintf(buffer, "%u", t2p->pdf_page+1); ++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "_", 1); +- buflen = sprintf(buffer, "%u", i+1); ++ buflen = snprintf(buffer, sizeof(buffer), "%u", i+1); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " ", 1); +- buflen = sprintf( +- buffer, +- "%lu", ++ buflen = snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); +@@ -4177,12 +4175,10 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ + } else { + written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12); + written += t2pWriteFile(output, (tdata_t) "/Im", 3); +- buflen = sprintf(buffer, "%u", t2p->pdf_page+1); ++ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " ", 1); +- buflen = sprintf( +- buffer, +- "%lu", ++ buflen = snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); +@@ -4191,9 +4187,7 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ + if(t2p->tiff_transferfunctioncount != 0) { + written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13); + t2pWriteFile(output, (tdata_t) "/GS1 ", 5); +- buflen = sprintf( +- buffer, +- "%lu", ++ buflen = snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)(object + 3)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); +@@ -4566,7 +4560,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){ + if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){ + for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){ + box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box; +- buflen=sprintf(buffer, ++ buflen=snprintf(buffer, sizeof(buffer), + "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n", + t2p->tiff_transferfunctioncount?"/GS1 gs ":"", + box.mat[0], +@@ -4581,7 +4575,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){ + } + } else { + box=t2p->pdf_imagebox; +- buflen=sprintf(buffer, ++ buflen=snprintf(buffer, sizeof(buffer), + "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n", + t2p->tiff_transferfunctioncount?"/GS1 gs ":"", + box.mat[0], +@@ -4606,59 +4600,48 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile, + TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + + written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output); + written += t2pWriteFile(output, + (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im", + 42); +- buflen=sprintf(buffer, "%u", t2p->pdf_page+1); ++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + if(tile != 0){ + written += t2pWriteFile(output, (tdata_t) "_", 1); +- buflen=sprintf(buffer, "%lu", (unsigned long)tile); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + } + written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8); +- _TIFFmemset((tdata_t)buffer, 0x00, 16); + if(tile==0){ +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width); + } else { + if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); + } else { +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); + } + } + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9); +- _TIFFmemset((tdata_t)buffer, 0x00, 16); + if(tile==0){ +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length); + } else { + if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); + } else { +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); + } + } + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19); +- _TIFFmemset((tdata_t)buffer, 0x00, 16); +- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); ++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13); + written += t2p_write_pdf_xobject_cs(t2p, output); +@@ -4702,11 +4685,10 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){ + t2p->pdf_colorspace ^= T2P_CS_PALETTE; + written += t2p_write_pdf_xobject_cs(t2p, output); + t2p->pdf_colorspace |= T2P_CS_PALETTE; +- buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 ); ++ buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 ); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " ", 1); +- _TIFFmemset(buffer, 0x00, 16); +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs ); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs ); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7); + return(written); +@@ -4740,10 +4722,10 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){ + X_W /= Y_W; + Z_W /= Y_W; + Y_W = 1.0F; +- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); ++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "/Range ", 7); +- buflen=sprintf(buffer, "[%d %d %d %d] \n", ++ buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n", + t2p->pdf_labrange[0], + t2p->pdf_labrange[1], + t2p->pdf_labrange[2], +@@ -4759,26 +4741,26 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){ + tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + + written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25); + if(t2p->tiff_transferfunctioncount == 1){ +- buflen=sprintf(buffer, "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)(t2p->pdf_xrefcount + 1)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); + } else { + written += t2pWriteFile(output, (tdata_t) "[ ", 2); +- buflen=sprintf(buffer, "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)(t2p->pdf_xrefcount + 1)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); +- buflen=sprintf(buffer, "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)(t2p->pdf_xrefcount + 2)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); +- buflen=sprintf(buffer, "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)(t2p->pdf_xrefcount + 3)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R ", 5); +@@ -4800,7 +4782,7 @@ tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){ + written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17); + written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19); + written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18); +- buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample)); ++ buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19); + written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output); +@@ -4827,7 +4809,7 @@ tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){ + tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ + + tsize_t written=0; +- char buffer[128]; ++ char buffer[256]; + int buflen=0; + + float X_W=0.0; +@@ -4895,16 +4877,16 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ + written += t2pWriteFile(output, (tdata_t) "<< \n", 4); + if(t2p->pdf_colorspace & T2P_CS_CALGRAY){ + written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12); +- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); ++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12); + } + if(t2p->pdf_colorspace & T2P_CS_CALRGB){ + written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12); +- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); ++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8); +- buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", ++ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n", + X_R, Y_R, Z_R, + X_G, Y_G, Z_G, + X_B, Y_B, Z_B); +@@ -4923,11 +4905,11 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ + tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + + written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11); +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7); + +@@ -4937,11 +4919,11 @@ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){ + tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + + written += t2pWriteFile(output, (tdata_t) "/N ", 3); +- buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel); ++ buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11); + t2p->pdf_colorspace ^= T2P_CS_ICCBASED; +@@ -5006,7 +4988,7 @@ tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){ + tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){ + + tsize_t written=0; +- char buffer[16]; ++ char buffer[32]; + int buflen=0; + + if(t2p->pdf_compression==T2P_COMPRESS_NONE){ +@@ -5021,41 +5003,33 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output + written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9); + if(tile==0){ + written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); +- buflen=sprintf(buffer, "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_width); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); +- buflen=sprintf(buffer, "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_length); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + } else { + if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ + written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + } else { + written += t2pWriteFile(output, (tdata_t) "/Columns ", 9); +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + } + if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ + written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + } else { + written += t2pWriteFile(output, (tdata_t) " /Rows ", 7); +- buflen=sprintf( +- buffer, +- "%lu", ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + } +@@ -5082,21 +5056,17 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output + if(t2p->pdf_compressionquality%100){ + written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13); + written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14); +- _TIFFmemset(buffer, 0x00, 16); +- buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100); ++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " /Columns ", 10); +- _TIFFmemset(buffer, 0x00, 16); +- buflen = sprintf(buffer, "%lu", ++ buflen = snprintf(buffer, sizeof(buffer), "%lu", + (unsigned long)t2p->tiff_width); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " /Colors ", 9); +- _TIFFmemset(buffer, 0x00, 16); +- buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel); ++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19); +- _TIFFmemset(buffer, 0x00, 16); +- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); ++ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) ">>\n", 3); + } +@@ -5116,16 +5086,16 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output + tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){ + + tsize_t written=0; +- char buffer[21]; ++ char buffer[64]; + int buflen=0; + uint32 i=0; + + written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7); +- buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); + written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22); + for (i=0;i<t2p->pdf_xrefcount;i++){ +- sprintf(buffer, "%.10lu 00000 n \n", ++ snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n", + (unsigned long)t2p->pdf_xrefoffsets[i]); + written += t2pWriteFile(output, (tdata_t) buffer, 20); + } +@@ -5149,17 +5119,14 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output) + snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand()); + + written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17); +- buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1)); ++ buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1)); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); +- _TIFFmemset(buffer, 0x00, 32); + written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7); +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); +- _TIFFmemset(buffer, 0x00, 32); + written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12); +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); +- _TIFFmemset(buffer, 0x00, 32); + written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11); + written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid, + sizeof(t2p->pdf_fileid) - 1); +@@ -5167,9 +5134,8 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output) + written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid, + sizeof(t2p->pdf_fileid) - 1); + written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16); +- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref); ++ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref); + written += t2pWriteFile(output, (tdata_t) buffer, buflen); +- _TIFFmemset(buffer, 0x00, 32); + written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7); + + return(written); +diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c +index 3330750..7a9a816 100644 +--- a/tools/tiff2ps.c ++++ b/tools/tiff2ps.c +@@ -1789,8 +1789,8 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) + imageOp = "imagemask"; + + (void)strcpy(im_x, "0"); +- (void)sprintf(im_y, "%lu", (long) h); +- (void)sprintf(im_h, "%lu", (long) h); ++ (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h); ++ (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h); + tile_width = w; + tile_height = h; + if (TIFFIsTiled(tif)) { +@@ -1811,7 +1811,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) + } + if (tile_height < h) { + fputs("/im_y 0 def\n", fd); +- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h); ++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h); + } + } else { + repeat_count = tf_numberstrips; +@@ -1823,7 +1823,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) + fprintf(fd, "/im_h %lu def\n", + (unsigned long) tile_height); + (void)strcpy(im_h, "im_h"); +- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h); ++ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h); + } + } + +diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c +index 9cd5d86..a2443aa 100644 +--- a/tools/tiffcrop.c ++++ b/tools/tiffcrop.c +@@ -2077,7 +2077,7 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex, + return 1; + } + +- sprintf (filenum, "-%03d%s", findex, export_ext); ++ snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext); + filenum[14] = '\0'; + strncat (exportname, filenum, 15); + } +@@ -2230,8 +2230,8 @@ main(int argc, char* argv[]) + + /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes + fewer than PATH_MAX */ +- memset (temp_filename, '\0', PATH_MAX + 1); +- sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images, ++ snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s", ++ dump.infilename, dump_images, + (dump.format == DUMP_TEXT) ? "txt" : "raw"); + if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL) + { +@@ -2249,8 +2249,8 @@ main(int argc, char* argv[]) + + /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes + fewer than PATH_MAX */ +- memset (temp_filename, '\0', PATH_MAX + 1); +- sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images, ++ snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s", ++ dump.outfilename, dump_images, + (dump.format == DUMP_TEXT) ? "txt" : "raw"); + if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL) + { +diff --git a/tools/tiffdither.c b/tools/tiffdither.c +index f2f0f20..4308946 100644 +--- a/tools/tiffdither.c ++++ b/tools/tiffdither.c +@@ -260,7 +260,7 @@ main(int argc, char* argv[]) + TIFFSetField(out, TIFFTAG_FILLORDER, fillorder); + else + CopyField(TIFFTAG_FILLORDER, shortv); +- sprintf(thing, "Dithered B&W version of %s", argv[optind]); ++ snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]); + TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing); + CopyField(TIFFTAG_PHOTOMETRIC, shortv); + CopyField(TIFFTAG_ORIENTATION, shortv); +-- +1.8.3.rc3 + + diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb index af1f2b6ad8..b7d1129ad6 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.0.3.bb @@ -6,6 +6,7 @@ HOMEPAGE = "http://www.remotesensing.org/libtiff/" SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \ file://libtool2.patch \ file://libtiff-CVE-2013-1960.patch \ + file://libtiff-CVE-2013-1961.patch \ file://libtiff-CVE-2013-4232.patch \ file://libtiff-CVE-2013-4243.patch \ file://libtiff-CVE-2013-4244.patch \ diff --git a/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch new file mode 100644 index 0000000000..a563b8b022 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/files/0001-libatomic_ops-Aarch64-basic-port.patch @@ -0,0 +1,239 @@ +From aac120d778ae5fc619b2fb8ef18ea18d3d5d20cc Mon Sep 17 00:00:00 2001 +From: Yvan Roux <yvan.roux@linaro.org> +Date: Wed, 23 Jan 2013 17:14:16 +0100 +Subject: [PATCH] Aarch64 basic port + +Adapted-for-OpenEmbedded-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> + + +Upstream-Status: Backport + +It is original from +https://github.com/ivmai/libatomic_ops/commit/cbbf86330fcb600cfe0f895cb970d922456005d6 + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + src/atomic_ops.h | 4 + src/atomic_ops/sysdeps/Makefile.am | 1 + src/atomic_ops/sysdeps/gcc/aarch64.h | 184 +++++++++++++++++++++++++++++++++++ + 3 files changed, 189 insertions(+) + create mode 100644 src/atomic_ops/sysdeps/gcc/aarch64.h + +--- libatomic_ops-7.2.orig/src/atomic_ops.h ++++ libatomic_ops-7.2/src/atomic_ops.h +@@ -242,10 +242,14 @@ + # endif /* __m68k__ */ + # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ + || defined(__powerpc64__) || defined(__ppc64__) + # include "atomic_ops/sysdeps/gcc/powerpc.h" + # endif /* __powerpc__ */ ++# if defined(__aarch64__) ++# include "atomic_ops/sysdeps/gcc/aarch64.h" ++# define AO_CAN_EMUL_CAS ++# endif /* __aarch64__ */ + # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS) + # include "atomic_ops/sysdeps/gcc/arm.h" + # define AO_CAN_EMUL_CAS + # endif /* __arm__ */ + # if defined(__cris__) || defined(CRIS) +--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/Makefile.am ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/Makefile.am +@@ -24,10 +24,11 @@ nobase_sysdep_HEADERS= generic_pthread.h + standard_ao_double_t.h \ + README \ + \ + armcc/arm_v6.h \ + \ ++ gcc/aarch64.h \ + gcc/alpha.h gcc/arm.h gcc/avr32.h gcc/cris.h \ + gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \ + gcc/mips.h gcc/powerpc.h gcc/s390.h \ + gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \ + \ +--- /dev/null ++++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/aarch64.h +@@ -0,0 +1,184 @@ ++/* ++ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. ++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ++ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. ++ * ++ * ++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED ++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. ++ * ++ * Permission is hereby granted to use or copy this program ++ * for any purpose, provided the above notices are retained on all copies. ++ * Permission to modify the code and to distribute modified code is granted, ++ * provided the above notices are retained, and a notice that the code was ++ * modified is included with the above copyright notice. ++ * ++ */ ++ ++#include "../read_ordered.h" ++ ++#include "../test_and_set_t_is_ao_t.h" ++ ++AO_INLINE void ++AO_nop_full(void) ++{ ++# ifndef AO_UNIPROCESSOR ++__sync_synchronize (); ++# endif ++} ++#define AO_HAVE_nop_full ++ ++AO_INLINE AO_t ++AO_load(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_load ++ ++AO_INLINE AO_t ++AO_load_acquire(const volatile AO_t *addr) ++{ ++ return __atomic_load_n (addr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_load_acquire ++ ++AO_INLINE void ++ AO_store(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_store ++ ++AO_INLINE void ++ AO_store_release(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_store_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELAXED); ++} ++# define AO_HAVE_test_and_set ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_acquire(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_ACQUIRE); ++} ++# define AO_HAVE_test_and_set_acquire ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_release(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_RELEASE); ++} ++# define AO_HAVE_test_and_set_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_full(volatile AO_TS_t *addr) ++{ ++ return __atomic_test_and_set(addr, __ATOMIC_SEQ_CST); ++} ++# define AO_HAVE_test_and_set_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add ++ ++AO_INLINE AO_t ++AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add_release(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add_full(volatile AO_t *p, AO_t incr) ++{ ++ return __atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add1(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add1 ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add1_full ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_sub1 ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_acquire(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_sub1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_release(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_sub1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_full(volatile AO_t *p) ++{ ++ return __atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_sub1_full ++ ++/* Returns nonzero if the comparison succeeded. */ ++AO_INLINE int ++AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_bool_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_compare_and_swap ++ ++AO_INLINE AO_t ++AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return __sync_val_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_fetch_compare_and_swap diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb index 4632d240d2..5a582287b5 100644 --- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb +++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_7.2.bb @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ PR = "r1" SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \ + file://0001-libatomic_ops-Aarch64-basic-port.patch \ " SRC_URI[md5sum] = "890acdc83a7cd10e2e9536062d3741c8" diff --git a/meta/recipes-multimedia/sbc/sbc_1.2.bb b/meta/recipes-multimedia/sbc/sbc_1.3.bb index 9cdf01bb74..2d7f31bc1b 100644 --- a/meta/recipes-multimedia/sbc/sbc_1.2.bb +++ b/meta/recipes-multimedia/sbc/sbc_1.3.bb @@ -10,7 +10,7 @@ DEPENDS = "libsndfile1" SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz" -SRC_URI[md5sum] = "ec65c444ad4c32aa85702641045b19e9" -SRC_URI[sha256sum] = "c2f01ea54f7473704825113a9cdd46a23e67c650eff575f0670c3d9d66c4a5dc" +SRC_URI[md5sum] = "2d8b7841f2c11ab287718d562f2b981c" +SRC_URI[sha256sum] = "e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309" inherit autotools pkgconfig |