recipes: remove blacklisted recipes

* as PNBLACKLIST message says, these recipes are blacklisted for long
  time and nobody showed any interest to fix them
* remove all unused .patch and .inc files as well

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa
2017-04-27 11:04:51 +02:00
parent 6775acb048
commit ec9e5ed062
410 changed files with 0 additions and 30810 deletions
@@ -1,136 +0,0 @@
HOMEPAGE = "http://www.linuxtv.org"
SUMMARY = "Linux DVB API applications and utilities"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
DEPENDS = "v4l-utils-native"
SRC_URI = " \
hg://linuxtv.org/hg;module=dvb-apps;protocol=http;name=apps \
git://linuxtv.org/git/dtv-scan-tables.git;protocol=http;destsuffix=dvb-apps/initial-scan-tables;name=scantables \
"
SRCREV_apps = "3d43b280298c"
SRCREV_scantables = "ceb11833b35f05813b1f0397a60e0f3b99430aab"
SRCREV_FORMAT = "apps_scantables"
S = "${WORKDIR}/${BPN}"
TARGET_CC_ARCH += "${LDFLAGS}"
EXTRA_OEMAKE = "VERSION_FILE='${STAGING_INCDIR}/linux/dvb/version.h'"
do_configure() {
sed -i -e s:/usr/include:${STAGING_INCDIR}:g util/av7110_loadkeys/generate-keynames.sh
}
do_compile_append() {
# dvb-apps only support DVBAPI v3, so generate them from the DVBAPI v5 downloaded files
make -C initial-scan-tables clean
make -C initial-scan-tables dvbv3
}
do_install() {
make DESTDIR=${D} install
# dvb-apps only support DVBAPI v3, so only install the generated DVBAPI v3 files
make -C initial-scan-tables DATADIR=${D}/${datadir} DVBV3DIR=dvb install_v3
install -d ${D}/${bindir}
install -d ${D}/${docdir}/dvb-apps
install -d ${D}/${docdir}/dvb-apps/szap
chmod a+rx ${D}/${libdir}/*.so*
# Install tests
install -m 0755 ${S}/test/setvoltage ${D}${bindir}/test_setvoltage
install -m 0755 ${S}/test/set22k ${D}${bindir}/test_set22k
install -m 0755 ${S}/test/sendburst ${D}${bindir}/test_sendburst
install -m 0755 ${S}/test/diseqc ${D}${bindir}/test_diseqc
install -m 0755 ${S}/test/test_sections ${D}${bindir}/
install -m 0755 ${S}/test/test_av_play ${D}${bindir}/
install -m 0755 ${S}/test/test_stillimage ${D}${bindir}/
install -m 0755 ${S}/test/test_dvr_play ${D}${bindir}/
install -m 0755 ${S}/test/test_tt ${D}${bindir}/
install -m 0755 ${S}/test/test_sec_ne ${D}${bindir}/
install -m 0755 ${S}/test/test_stc ${D}${bindir}/
install -m 0755 ${S}/test/test_av ${D}${bindir}/
install -m 0755 ${S}/test/test_vevent ${D}${bindir}/
install -m 0755 ${S}/test/test_pes ${D}${bindir}/
install -m 0755 ${S}/test/test_dvr ${D}${bindir}/
cp -pPR ${S}/util/szap/channels-conf* ${D}/${docdir}/dvb-apps/szap/
cp -pPR ${S}/util/szap/README ${D}/${docdir}/dvb-apps/szap/
}
python populate_packages_prepend () {
dvb_libdir = bb.data.expand('${libdir}', d)
do_split_packages(d, dvb_libdir, '^lib(.*)\.so$', 'lib%s', 'DVB %s package', extra_depends='', allow_links=True)
do_split_packages(d, dvb_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'DVB %s development package', extra_depends='${PN}-dev')
do_split_packages(d, dvb_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'DVB %s development package', extra_depends='${PN}-dev')
do_split_packages(d, dvb_libdir, '^lib(.*)\.so\.*', 'lib%s', 'DVB %s library', extra_depends='', allow_links=True)
}
PACKAGES =+ "dvb-evtest dvb-evtest-dbg \
dvbapp-tests dvbapp-tests-dbg \
dvbdate dvbdate-dbg \
dvbtraffic dvbtraffic-dbg \
dvbnet dvbnet-dbg \
dvb-scan dvb-scan-dbg dvb-scan-data \
dvb-azap dvb-azap-dbg \
dvb-czap dvb-czap-dbg \
dvb-szap dvb-szap-dbg \
dvb-tzap dvb-tzap-dbg \
dvb-femon dvb-femon-dbg \
dvb-zap-data"
# Expose the packages from the above spitting
PACKAGES =+ "libdvbapi libdvbcfg libdvben50221 \
libesg libucsi libdvbsec"
FILES_${PN} = "${bindir} ${datadir}/dvb"
FILES_${PN}-doc = ""
FILES_${PN}-dev = "${includedir}"
FILES_dvb-evtest = "${bindir}/evtest"
FILES_dvb-evtest-dbg = "${bindir}/.debug/evtest"
RCONFLICTS_dvb-evtest = "evtest"
FILES_dvbapp-tests = "${bindir}/*test* "
FILES_dvbapp-tests-dbg = "${bindir}/.debug/*test*"
FILES_dvbdate = "${bindir}/dvbdate"
FILES_dvbdate-dbg = "${bindir}/.debug/dvbdate"
FILES_dvbtraffic = "${bindir}/dvbtraffic"
FILES_dvbtraffic-dbg = "${bindir}/.debug/dvbtraffic"
FILES_dvbnet = "${bindir}/dvbnet"
FILES_dvbnet-dbg = "${bindir}/.debug/dvbnet"
FILES_dvb-scan = "${bindir}/*scan "
FILES_dvb-scan-dbg = "${bindir}/.debug/*scan"
FILES_dvb-scan-data = "${datadir}/dvb"
FILES_dvb-azap = "${bindir}/azap"
FILES_dvb-azap-dbg = "${bindir}/.debug/azap"
FILES_dvb-czap = "${bindir}/czap"
FILES_dvb-czap-dbg = "${bindir}/.debug/czap"
FILES_dvb-szap = "${bindir}/szap"
FILES_dvb-szap-dbg = "${bindir}/.debug/szap"
FILES_dvb-tzap = "${bindir}/tzap"
FILES_dvb-tzap-dbg = "${bindir}/.debug/tzap"
FILES_dvb-femon = "${bindir}/femon"
FILES_dvb-femon-dbg = "${bindir}/.debug/femon"
FILES_dvb-zap-data = "${docdir}/dvb-apps/szap"
RDEPENDS_dvbdate =+ "libdvbapi libucsi"
RDEPENDS_dvbtraffic =+ "libdvbapi"
RDEPENDS_dvb-scan =+ "libdvbapi libdvbcfg libdvbsec"
RDEPENDS_dvb-apps =+ "libdvbapi libdvbcfg libdvbsec libdvben50221 libucsi"
RDEPENDS_dvb-femon =+ "libdvbapi"
RDEPENDS_dvbnet =+ "libdvbapi"
PNBLACKLIST[dvb-apps] ?= "Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130603/ - the recipe will be removed on 2017-09-01 unless the issue is fixed"
@@ -1,40 +0,0 @@
From f0dab6d6fe4b0aae4394eee93be86e9747c6ed5c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 22 Nov 2016 05:07:38 +0000
Subject: [PATCH] Fix checks for sse2/mmx
Just checking for cmdline options is not enough
its better to check for builtin defines to be
sure, clang does not error out on sse2 options on
arm e.g. and it ends up doing SSE2 stuff for arm
which is not desired
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 47d2cf2..4be000c 100755
--- a/configure
+++ b/configure
@@ -118,8 +118,14 @@ fi
# Valiate compiler
check_cc || die 'No C compiler found'
check_cc_header execinfo
-check_cc_option mmx
-check_cc_option sse2
+check_cc_snippet mmx '#ifndef __MMX__
+error "MMX not supported"
+#endif
+'
+check_cc_snippet sse2 '#ifndef __SSE2__
+error "SSE2 not supported"
+#endif
+'
if check_cc '
#if !defined(__clang__)
--
1.9.1
@@ -1,31 +0,0 @@
From 7d672305c7ad2f716dfe1c487b525a1a92954d4a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 22 Nov 2016 06:22:36 +0000
Subject: [PATCH] Makefile: Ignore warning about wrong includes
It happens on musl especially
usr/include/sys/poll.h:1:2: error: redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror,-W#warnings]
| #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
| ^
| In file included from src/avahi.c:48:
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index f41ef1a..cc7b249 100644
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,7 @@ CFLAGS += -Wno-microsoft -Qunused-arguments -Wno-unused-function
CFLAGS += -Wno-unused-value -Wno-tautological-constant-out-of-range-compare
CFLAGS += -Wno-parentheses-equality -Wno-incompatible-pointer-types
CFLAGS += -Wno-error=varargs
+CFLAGS += -Wno-error=\#warnings
endif
ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)
--
1.8.3.1
@@ -1,32 +0,0 @@
From 906d95695af95970bf551ea55b6c3e70332c6b97 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 22 Nov 2016 05:22:32 +0000
Subject: [PATCH] disable varargs warning on clang
The issue is that 'len' is an unsigned char and we violate the promotion rules
for passing the value to va_start.
passing an object that undergoes defau
lt argument promotion to 'va_start' has undefined behavior [-Wvarargs]
| va_start(ap, len);
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 8c5e380..f41ef1a 100644
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,7 @@ ifeq ($(COMPILER), clang)
CFLAGS += -Wno-microsoft -Qunused-arguments -Wno-unused-function
CFLAGS += -Wno-unused-value -Wno-tautological-constant-out-of-range-compare
CFLAGS += -Wno-parentheses-equality -Wno-incompatible-pointer-types
+CFLAGS += -Wno-error=varargs
endif
ifeq ($(CONFIG_LIBFFMPEG_STATIC),yes)
--
1.9.1
@@ -1,37 +0,0 @@
From a715671eadcbf989fdaf05f62e71b93ac1749615 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 22 Nov 2016 06:08:31 +0000
Subject: [PATCH] dvr: Use labs() instead of abs()
Makes clang happy
dvr/dvr_db.c:853:10: error: absolute value function
'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
if ((abs(de->de_start - e->start) < 600) && (abs(de->de_stop - e->stop) < 600)) {
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/dvr/dvr_db.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c
index 165caa6..5656569 100644
--- a/src/dvr/dvr_db.c
+++ b/src/dvr/dvr_db.c
@@ -414,11 +414,11 @@ dvr_entry_fuzzy_match(dvr_entry_t *de, epg_broadcast_t *e)
/* Wrong length (+/-20%) */
t1 = de->de_stop - de->de_start;
t2 = e->stop - e->start;
- if ( abs(t2 - t1) > (t1 / 5) )
+ if ( labs(t2 - t1) > (t1 / 5) )
return 0;
/* Outside of window */
- if (abs(e->start - de->de_start) > de->de_config->dvr_update_window)
+ if (labs(e->start - de->de_start) > de->de_config->dvr_update_window)
return 0;
/* Title match (or contains?) */
--
1.9.1
@@ -1,40 +0,0 @@
From c3767e189e90965407937b6178adbbd8cdafe31d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 22 Nov 2016 05:59:10 +0000
Subject: [PATCH] hdhomerun: Override forced overrdiing og CC/STRIP and CFLAGS
This is required for cross compiling otherwise it ends up
using build host gcc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile.hdhomerun | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile.hdhomerun b/Makefile.hdhomerun
index 943ffec..8bd14ff 100644
--- a/Makefile.hdhomerun
+++ b/Makefile.hdhomerun
@@ -18,8 +18,8 @@
include $(dir $(lastword $(MAKEFILE_LIST))).config.mk
-unexport CFLAGS
-unexport LDFLAGS
+#unexport CFLAGS
+#unexport LDFLAGS
define DOWNLOAD
@mkdir -p $(LIBHDHRDIR)/build
@@ -75,6 +75,8 @@ $(LIBHDHRDIR)/$(LIBHDHR)/.tvh_download:
$(call DOWNLOAD,$(LIBHDHR_URL),$(LIBHDHRDIR)/$(LIBHDHR_TB),$(LIBHDHR_SHA1))
$(call UNTAR,$(LIBHDHR_TB),z)
ln -sf libhdhomerun $(LIBHDHRDIR)/$(LIBHDHR)
+ @sed -i -e "s/CC.*:=/CC ?=/" $(LIBHDHRDIR)/$(LIBHDHR)/Makefile
+ @sed -i -e "s/STRIP.*:=/STRIP ?=/" $(LIBHDHRDIR)/$(LIBHDHR)/Makefile
@touch $@
$(LIBHDHRDIR)/$(LIBHDHR)/.tvh_build: \
--
1.9.1
@@ -1,43 +0,0 @@
SUMMARY = "Tvheadend TV streaming server"
HOMEPAGE = "https://www.lonelycoder.com/redmine/projects/tvheadend"
DEPENDS = "avahi zlib openssl python-native dvb-apps"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9cae5acac2e9ee2fc3aec01ac88ce5db"
SRC_URI = "git://github.com/tvheadend/tvheadend.git;branch=release/4.0 \
file://0001-Fix-checks-for-sse2-mmx.patch \
file://0001-disable-varargs-warning-on-clang.patch \
file://0001-hdhomerun-Override-forced-overrdiing-og-CC-STRIP-and.patch \
file://0001-dvr-Use-labs-instead-of-abs.patch \
file://0001-Makefile-Ignore-warning-about-wrong-includes.patch \
"
SRCREV = "64fec8120158de585e18be705055259484518d94"
PV = "4.0.9+git${SRCREV}"
S = "${WORKDIR}/git"
PACKAGECONFIG ?= ""
PACKAGECONFIG[uriparser] = "--enable-uriparser,--disable-uriparser,uriparser"
do_configure() {
./configure ${PACKAGECONFIG_CONFARGS} \
--prefix=${prefix} \
--libdir=${libdir} \
--bindir=${bindir} \
--datadir=${datadir} \
--arch=${TARGET_ARCH} \
--disable-dvbscan \
--disable-bundle
}
do_install() {
oe_runmake install DESTDIR=${D}
}
FILES_${PN} += "${datadir}/${BPN}"
RDEPENDS_${PN} += "libdvben50221 libucsi libdvbapi"
PNBLACKLIST[tvheadend] ?= "Depends on blacklisted dvb-apps - the recipe will be removed on 2017-09-01 unless the issue is fixed"
@@ -1,427 +0,0 @@
From 06a8224c99282ac1a606edd9e8ea3f591112942d Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Thu, 18 Feb 2016 14:04:31 +0100
Subject: [PATCH] Update to p8-platform
---
CMakeLists.txt | 6 +++---
pvr.hts/changelog.txt | 4 ++--
src/AutoRecordings.cpp | 2 +-
src/HTSPConnection.cpp | 8 +++----
src/HTSPDemuxer.cpp | 2 +-
src/HTSPVFS.cpp | 6 +++---
src/TimeRecordings.cpp | 2 +-
src/Tvheadend.cpp | 4 ++--
src/Tvheadend.h | 38 +++++++++++++++++-----------------
src/client.cpp | 4 ++--
src/client.h | 4 ++--
src/tvheadend/Subscription.cpp | 2 +-
src/tvheadend/Subscription.h | 4 ++--
src/tvheadend/utilities/AsyncState.cpp | 4 ++--
src/tvheadend/utilities/AsyncState.h | 6 +++---
15 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0842682..cb04942 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,10 +6,10 @@ enable_language(CXX)
find_package(kodi REQUIRED)
find_package(kodiplatform REQUIRED)
-find_package(platform REQUIRED)
+find_package(p8-platform REQUIRED)
include_directories(${kodiplatform_INCLUDE_DIRS}
- ${platform_INCLUDE_DIRS}
+ ${p8-platform_INCLUDE_DIRS}
${KODI_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/lib)
@@ -95,7 +95,7 @@ list(APPEND HTS_SOURCES
add_subdirectory(lib/libhts)
-set(DEPLIBS ${platform_LIBRARIES} hts)
+set(DEPLIBS ${p8-platform_LIBRARIES} hts)
if(WIN32)
list(APPEND DEPLIBS ws2_32)
endif()
diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt
index 9ffa33c..1e7fe30 100644
--- a/pvr.hts/changelog.txt
+++ b/pvr.hts/changelog.txt
@@ -49,7 +49,7 @@
- fixed: Autorec: Start and stop time handling.
- fixed: LocaltimeToUTC conversion (timer settings clock display incorrect).
- fixed: Several issues with predictive tuning.
-- added: build: Automatically fill in platform and library name.
+- added: build: Automatically fill in p8-platform and library name.
- fixed: Use epg data only for creation of epg-based timers.
- improved: Do not try to reconnect to tvh while suspending or not fully awake again.
@@ -97,7 +97,7 @@
- added: support for creating repeating timers, aka time schedules
- fixed: conditions for addon restart after settings changes
- internal: fixed build system regressions introduced with move to cmake
-- internal: updated to use libplatform
+- internal: updated to use libp8-platform
2.1.7
- added: support for radio channel groups
diff --git a/src/AutoRecordings.cpp b/src/AutoRecordings.cpp
index 5fa60a0..d9e5e1d 100644
--- a/src/AutoRecordings.cpp
+++ b/src/AutoRecordings.cpp
@@ -26,7 +26,7 @@
#include "tvheadend/utilities/Utilities.h"
#include "tvheadend/utilities/Logger.h"
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend;
using namespace tvheadend::entity;
using namespace tvheadend::utilities;
diff --git a/src/HTSPConnection.cpp b/src/HTSPConnection.cpp
index aec1296..86f5004 100644
--- a/src/HTSPConnection.cpp
+++ b/src/HTSPConnection.cpp
@@ -19,9 +19,9 @@
*
*/
-#include "platform/threads/mutex.h"
-#include "platform/util/StringUtils.h"
-#include "platform/sockets/tcp.h"
+#include "p8-platform/threads/mutex.h"
+#include "p8-platform/util/StringUtils.h"
+#include "p8-platform/sockets/tcp.h"
extern "C" {
#include "libhts/htsmsg_binary.h"
@@ -33,7 +33,7 @@ extern "C" {
using namespace std;
using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend;
using namespace tvheadend::utilities;
diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
index a6e1f12..7f45345 100644
--- a/src/HTSPDemuxer.cpp
+++ b/src/HTSPDemuxer.cpp
@@ -27,7 +27,7 @@
using namespace std;
using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend;
using namespace tvheadend::utilities;
diff --git a/src/HTSPVFS.cpp b/src/HTSPVFS.cpp
index 0463f56..0404bab 100644
--- a/src/HTSPVFS.cpp
+++ b/src/HTSPVFS.cpp
@@ -19,8 +19,8 @@
*
*/
-#include "platform/threads/mutex.h"
-#include "platform/util/StringUtils.h"
+#include "p8-platform/threads/mutex.h"
+#include "p8-platform/util/StringUtils.h"
#include "tvheadend/utilities/Logger.h"
extern "C" {
@@ -30,7 +30,7 @@ extern "C" {
#include "Tvheadend.h"
using namespace std;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend::utilities;
/*
diff --git a/src/TimeRecordings.cpp b/src/TimeRecordings.cpp
index 5d34938..97aae09 100644
--- a/src/TimeRecordings.cpp
+++ b/src/TimeRecordings.cpp
@@ -25,7 +25,7 @@
#include "tvheadend/utilities/Utilities.h"
#include "tvheadend/utilities/Logger.h"
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend;
using namespace tvheadend::entity;
using namespace tvheadend::utilities;
diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
index 2057241..14c3bd4 100644
--- a/src/Tvheadend.cpp
+++ b/src/Tvheadend.cpp
@@ -23,7 +23,7 @@
#include <ctime>
#include <memory>
-#include "platform/util/StringUtils.h"
+#include "p8-platform/util/StringUtils.h"
#include "Tvheadend.h"
#include "tvheadend/utilities/Utilities.h"
@@ -31,7 +31,7 @@
using namespace std;
using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend;
using namespace tvheadend::entity;
using namespace tvheadend::utilities;
diff --git a/src/Tvheadend.h b/src/Tvheadend.h
index 2ce4552..e794716 100644
--- a/src/Tvheadend.h
+++ b/src/Tvheadend.h
@@ -22,10 +22,10 @@
*/
#include "client.h"
-#include "platform/sockets/tcp.h"
-#include "platform/threads/threads.h"
-#include "platform/threads/mutex.h"
-#include "platform/util/buffer.h"
+#include "p8-platform/sockets/tcp.h"
+#include "p8-platform/threads/threads.h"
+#include "p8-platform/threads/mutex.h"
+#include "p8-platform/util/buffer.h"
#include "kodi/xbmc_codec_types.h"
#include "kodi/xbmc_stream_utils.hpp"
#include "kodi/libXBMC_addon.h"
@@ -88,7 +88,7 @@ class CHTSPMessage;
/* Typedefs */
typedef std::map<uint32_t,CHTSPResponse*> CHTSPResponseList;
-typedef PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
+typedef P8PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
/*
* HTSP Response handler
@@ -98,10 +98,10 @@ class CHTSPResponse
public:
CHTSPResponse();
~CHTSPResponse();
- htsmsg_t *Get ( PLATFORM::CMutex &mutex, uint32_t timeout );
+ htsmsg_t *Get ( P8PLATFORM::CMutex &mutex, uint32_t timeout );
void Set ( htsmsg_t *m );
private:
- PLATFORM::CCondition<volatile bool> m_cond;
+ P8PLATFORM::CCondition<volatile bool> m_cond;
bool m_flag;
htsmsg_t *m_msg;
};
@@ -146,7 +146,7 @@ public:
* HTSP Connection registration thread
*/
class CHTSPRegister
- : public PLATFORM::CThread
+ : public P8PLATFORM::CThread
{
friend class CHTSPConnection;
@@ -163,7 +163,7 @@ private:
* HTSP Connection
*/
class CHTSPConnection
- : public PLATFORM::CThread
+ : public P8PLATFORM::CThread
{
friend class CHTSPRegister;
@@ -190,7 +190,7 @@ public:
inline bool IsConnected ( void ) const { return m_ready; }
bool WaitForConnection ( void );
- inline PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
+ inline P8PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
void OnSleep ( void );
void OnWake ( void );
@@ -202,10 +202,10 @@ private:
bool SendHello ( void );
bool SendAuth ( const std::string &u, const std::string &p );
- PLATFORM::CTcpSocket *m_socket;
- PLATFORM::CMutex m_mutex;
+ P8PLATFORM::CTcpSocket *m_socket;
+ P8PLATFORM::CMutex m_mutex;
CHTSPRegister m_regThread;
- PLATFORM::CCondition<volatile bool> m_regCond;
+ P8PLATFORM::CCondition<volatile bool> m_regCond;
bool m_ready;
uint32_t m_seq;
std::string m_serverName;
@@ -273,13 +273,13 @@ public:
void SetStreamingProfile(const std::string &profile);
private:
- PLATFORM::CMutex m_mutex;
+ P8PLATFORM::CMutex m_mutex;
CHTSPConnection &m_conn;
- PLATFORM::SyncedBuffer<DemuxPacket*> m_pktBuffer;
+ P8PLATFORM::SyncedBuffer<DemuxPacket*> m_pktBuffer;
ADDON::XbmcStreamProperties m_streams;
std::map<int,int> m_streamStat;
int64_t m_seekTime;
- PLATFORM::CCondition<volatile int64_t> m_seekCond;
+ P8PLATFORM::CCondition<volatile int64_t> m_seekCond;
bool m_seeking;
bool m_speedChange;
tvheadend::status::SourceInfo m_sourceInfo;
@@ -350,7 +350,7 @@ private:
* Root object for Tvheadend connection
*/
class CTvheadend
- : public PLATFORM::CThread
+ : public P8PLATFORM::CThread
{
public:
CTvheadend();
@@ -422,7 +422,7 @@ private:
*/
tvheadend::Profiles m_profiles;
- PLATFORM::CMutex m_mutex;
+ P8PLATFORM::CMutex m_mutex;
CHTSPConnection m_conn;
@@ -519,7 +519,7 @@ public:
*/
bool WaitForConnection ( void )
{
- PLATFORM::CLockObject lock(m_conn.Mutex());
+ P8PLATFORM::CLockObject lock(m_conn.Mutex());
return m_conn.WaitForConnection();
}
std::string GetServerName ( void )
diff --git a/src/client.cpp b/src/client.cpp
index 94d2db9..3295914 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -22,14 +22,14 @@
#include "client.h"
#include "kodi/xbmc_pvr_dll.h"
#include "kodi/libKODI_guilib.h"
-#include "platform/util/util.h"
+#include "p8-platform/util/util.h"
#include "Tvheadend.h"
#include "tvheadend/Settings.h"
#include "tvheadend/utilities/Logger.h"
using namespace std;
using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend;
using namespace tvheadend::utilities;
diff --git a/src/client.h b/src/client.h
index 3a5f950..a10659b 100644
--- a/src/client.h
+++ b/src/client.h
@@ -20,8 +20,8 @@
*
*/
-#include "platform/os.h"
-#include "platform/threads/mutex.h"
+#include "p8-platform/os.h"
+#include "p8-platform/threads/mutex.h"
#include "kodi/libXBMC_addon.h"
#include "kodi/libXBMC_pvr.h"
#include "kodi/libXBMC_codec.h"
diff --git a/src/tvheadend/Subscription.cpp b/src/tvheadend/Subscription.cpp
index 182ca7f..e18af1e 100644
--- a/src/tvheadend/Subscription.cpp
+++ b/src/tvheadend/Subscription.cpp
@@ -23,7 +23,7 @@
#include "utilities/Logger.h"
#include "../Tvheadend.h"
-using namespace PLATFORM;
+using namespace P8PLATFORM;
using namespace tvheadend;
using namespace tvheadend::utilities;
diff --git a/src/tvheadend/Subscription.h b/src/tvheadend/Subscription.h
index b03bcce..363e5ef 100644
--- a/src/tvheadend/Subscription.h
+++ b/src/tvheadend/Subscription.h
@@ -22,7 +22,7 @@
*/
#include <string>
-#include "platform/threads/mutex.h"
+#include "p8-platform/threads/mutex.h"
extern "C"
{
@@ -146,6 +146,6 @@ namespace tvheadend
std::string m_profile;
CHTSPConnection &m_conn;
- mutable PLATFORM::CMutex m_mutex;
+ mutable P8PLATFORM::CMutex m_mutex;
};
}
diff --git a/src/tvheadend/utilities/AsyncState.cpp b/src/tvheadend/utilities/AsyncState.cpp
index 0c30a93..1f4fdf3 100644
--- a/src/tvheadend/utilities/AsyncState.cpp
+++ b/src/tvheadend/utilities/AsyncState.cpp
@@ -22,7 +22,7 @@
#include "AsyncState.h"
using namespace tvheadend::utilities;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
struct Param {
eAsyncState state;
@@ -37,7 +37,7 @@ AsyncState::AsyncState(int timeout)
eAsyncState AsyncState::GetState()
{
- PLATFORM::CLockObject lock(m_mutex);
+ P8PLATFORM::CLockObject lock(m_mutex);
return m_state;
}
diff --git a/src/tvheadend/utilities/AsyncState.h b/src/tvheadend/utilities/AsyncState.h
index 1d672da..0819cd8 100644
--- a/src/tvheadend/utilities/AsyncState.h
+++ b/src/tvheadend/utilities/AsyncState.h
@@ -22,7 +22,7 @@
#ifndef ASYNCSTATE_H
#define ASYNCSTATE_H
-#include "platform/threads/mutex.h"
+#include "p8-platform/threads/mutex.h"
namespace tvheadend {
namespace utilities {
@@ -75,8 +75,8 @@ namespace tvheadend {
static bool PredicateCallback ( void *param );
eAsyncState m_state;
- PLATFORM::CMutex m_mutex;
- PLATFORM::CCondition<bool> m_condition;
+ P8PLATFORM::CMutex m_mutex;
+ P8PLATFORM::CCondition<bool> m_condition;
int m_timeout;
};
--
2.0.1
@@ -1,57 +0,0 @@
SUMMARY = "Kodi Media Center PVR plugins"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://src/client.cpp;md5=c8f6b73c5bc1048a3d6506700a7a91d2"
DEPENDS = " \
zip-native \
p8platform \
kodi-platform \
"
SRCREV_pvrhts = "7f75b70527922aef953123ff97ebaa22d9fb7cb4"
SRCREV_FORMAT = "pvrhts"
PV = "2.2.13+gitr${SRCPV}"
SRC_URI = "git://github.com/kodi-pvr/pvr.hts.git;branch=Jarvis;destsuffix=pvr.hts;name=pvrhts \
file://0001-Update-to-p8-platform.patch \
"
inherit cmake pkgconfig gettext
S = "${WORKDIR}/pvr.hts"
EXTRA_OECMAKE = " \
-DADDONS_TO_BUILD=pvr.hts \
-DADDON_SRC_PREFIX=${WORKDIR}/git \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=${datadir}/kodi/addons \
-DCMAKE_MODULE_PATH=${STAGING_DIR_HOST}${libdir}/kodi \
-DCMAKE_PREFIX_PATH=${STAGING_DIR_HOST}${prefix} \
-DPACKAGE_ZIP=1 \
"
do_compile_prepend() {
sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
-e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
${B}/CMakeFiles/*/flags.make
sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
${B}/CMakeFiles/*/link.txt
}
# Make zip package for manual installation
do_install_append() {
install -d ${D}${datadir}/kodi/addons/packages/
( cd ${D}${datadir}/kodi/addons
zip -r ${D}${datadir}/kodi/addons/packages/pvr.hts-${PV}.zip pvr.hts -x '*.debug*' )
}
# Doesn't get added automagically, dlopen()?
RDEPENDS_${PN} = "libkodiplatform"
INSANE_SKIP_${PN} = "dev-so"
FILES_${PN} += "${datadir}/kodi"
FILES_${PN}-dbg += "${datadir}/kodi/addons/*/.debug/"
PNBLACKLIST[kodi-addon-pvr-hts] ?= "Depends on blacklisted kodi - the recipe will be removed on 2017-09-01 unless the issue is fixed"
@@ -1,40 +0,0 @@
From 3136317f096ea7fda4fb907e775a01952c4aae3d Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Fri, 19 Feb 2016 10:33:00 +0100
Subject: [PATCH] fix cross compile badness
From https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/kodi-platform/patches/kodi-platform-01_crosscompile-badness.patch
---
CMakeLists.txt | 2 +-
kodiplatform-config.cmake.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf6b659..9abe773 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif()
-set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
+set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX_TOOLCHAIN}/include/kodi")
IF(WIN32)
LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows")
ENDIF(WIN32)
diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in
index 3fc5273..60bdf1b 100644
--- a/kodiplatform-config.cmake.in
+++ b/kodiplatform-config.cmake.in
@@ -10,7 +10,7 @@
#
# propagate these properties from one build system to the other
set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@")
-set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
+set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include)
set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@")
set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@")
--
2.0.1
@@ -1,12 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9abe773..ae433fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,6 @@ find_package(kodi REQUIRED)
find_package(TinyXML REQUIRED)
find_package(Threads REQUIRED)
find_package(p8-platform REQUIRED)
-include(UseMultiArch.cmake)
include(CheckAtomic.cmake)
set(kodiplatform_NAME kodiplatform)
@@ -1,39 +0,0 @@
SUMMARY = "Platform support library used by libCEC and binary add-ons for Kodi"
HOMEPAGE = "http://libcec.pulse-eight.com/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://src/util/XMLUtils.cpp;beginline=2;endline=18;md5=dae8e846500e70dd8ecee55f3f018c30"
DEPENDS = "libtinyxml kodi"
PV = "16.0.0"
SRCREV = "c8188d82678fec6b784597db69a68e74ff4986b5"
SRC_URI = "git://github.com/xbmc/kodi-platform.git \
file://0001-fix-cross-compile-badness.patch \
file://kodi-platform-02_no-multi-lib.patch \
"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${STAGING_DIR_TARGET} \
-DCMAKE_INSTALL_LIBDIR=${libdir} \
-DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir} \
-DKODI_INCLUDE_DIR=${STAGING_LIBDIR}/kodi \
-DKODI_INCLUDE_DIR=${STAGING_INCDIR}/kodi \
"
do_compile_prepend() {
sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
-e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
${B}/CMakeFiles/kodiplatform.dir/flags.make
sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
${B}/CMakeFiles/kodiplatform.dir/link.txt
}
RPROVIDES_${PN} += "libkodiplatform"
FILES_${PN}-dev += "${libdir}/*platform"
PNBLACKLIST[kodi-platform] ?= "Depends on blacklisted kodi - the recipe will be removed on 2017-09-01 unless the issue is fixed"
@@ -1,24 +0,0 @@
SUMMARY = "Systemd service for kodi startup"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
PV = "1.0"
SRC_URI = "file://kodi.service"
inherit systemd
do_install() {
install -d ${D}/lib/systemd/system
install -m 0644 ${WORKDIR}/kodi.service ${D}/lib/systemd/system/
}
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "kodi.service"
RDEPENDS_${PN} += "xinit kodi"
PNBLACKLIST[kodi-startup] ?= "Runtime depends on blacklisted kodi - the recipe will be removed on 2017-09-01 unless the issue is fixed"
PNBLACKLIST[kodi-startup] ?= "Runtime depends on blacklisted kodi-startup-dev - the recipe will be removed on 2017-09-01 unless the issue is fixed"
@@ -1,57 +0,0 @@
SUMMARY = "MKVToolNix -- Cross-platform tools for Matroska"
HOMEPAGE = "http://www.bunkus.org/videotools/mkvtoolnix/source.html"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "curl boost expat zlib libebml libmatroska libogg libvorbis bzip2 lzo file ruby-native"
PV = "8.4.0+git${SRCPV}"
SRCREV_mkvtoolnix = "7f63ea48ee474754a95838f37aba8f6118c94a65"
SRCREV_libebml = "04b34b0dbded40e0cec93cafa6a4f4c8e90c3206"
SRCREV_libmatroska = "db5d627b5bf48516c9e0b540254c0d36595760c3"
SRCREV_FORMAT = "mkvtoolnix"
SRC_URI = " \
git://github.com/mbunkus/mkvtoolnix.git;name=mkvtoolnix \
git://github.com/Matroska-Org/libebml.git;name=libebml;destsuffix=git/lib/libebml \
git://github.com/Matroska-Org/libmatroska.git;name=libmatroska;destsuffix=git/lib/libmatroska \
"
S = "${WORKDIR}/git"
inherit autotools-brokensep gettext
# make sure rb files are used from sysroot, not from host
# ruby-1.9.3-always-use-i386.patch is doing target_cpu=`echo $target_cpu | sed s/i.86/i386/`
# we need to replace it too (a bit longer version without importing re)
RUBY_SYS = "${@ '${BUILD_SYS}'.replace('i486', 'i386').replace('i586', 'i386').replace('i686', 'i386') }"
export RUBYLIB="${STAGING_DATADIR_NATIVE}/rubygems:${STAGING_LIBDIR_NATIVE}/ruby:${STAGING_LIBDIR_NATIVE}/ruby/${RUBY_SYS}"
PACKAGECONFIG ??= "flac ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
PACKAGECONFIG[flac] = "--with-flac,--without-flac,flac"
PACKAGECONFIG[qt5] = "--enable-qt --with-moc=${STAGING_BINDIR_NATIVE}/qt5/moc --with-uic=${STAGING_BINDIR_NATIVE}/qt5/uic --with-rcc=${STAGING_BINDIR_NATIVE}/qt5/rcc,--disable-qt,qtbase"
EXTRA_OECONF = " --with-boost-libdir=${STAGING_LIBDIR} \
"
FILES_${PN} += "${datadir}"
# remove some hardcoded searchpaths
do_configure_prepend() {
sed -i -e s:/usr/local/lib:${STAGING_LIBDIR}:g -e s:/usr/local/include:${STAGING_INCDIR}:g ${S}/ac/qt5.m4
}
# Yeah, no makefile
do_compile() {
LC_ALL="en_US.UTF-8" ${S}/drake ${PARALLEL_MAKE}
}
do_install() {
LC_ALL="en_US.UTF-8" ${S}/drake install DESTDIR=${D}
}
# | In file included from src/common/utf8_codecvt_facet.cpp:22:0:
# | src/common/../../lib/boost/utf8_codecvt_facet/utf8_codecvt_facet.cpp:174:5: error: 'int mtx::utf8_codecvt_facet::do_length' is not a static data member of 'struct mtx::utf8_codecvt_facet'
# | BOOST_CODECVT_DO_LENGTH_CONST std::mbstate_t &,
# | ^
PNBLACKLIST[mkvtoolnix] ?= "BROKEN: Failx to build with gcc-5 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
@@ -1,17 +0,0 @@
In a cross compile environment adding paths like /usr are not correct.
With this patch we make it so that its relative to sysroot if the compiler
defines one.
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: a/src/Makefile.am
===================================================================
--- a/src/Makefile.am 2013-02-08 22:35:08.000000000 -0800
+++ b/src/Makefile.am 2013-10-13 01:31:38.812869080 -0700
@@ -33,5 +33,5 @@
video_encode.c video_encode.h \
subtitles.c subtitles.h
-coriander_LDADD = -L/usr/X11R6/lib/ @PACKAGE_LIBS@ $(INTLLIBS) $(LIBTIFF_LIBS) $(FTPLIB_LIBS) $(SDLLIB_LIBS) $(LIBDC_LIBS) $(LIBRAW_LIBS) $(XV_LIBS) $(COR_LFS_LDFLAGS) -lgthread-2.0 $(FFMPEG_LIBS) $(X11_LIBS)
+coriander_LDADD = -L=/usr/X11R6/lib/ @PACKAGE_LIBS@ $(INTLLIBS) $(LIBTIFF_LIBS) $(FTPLIB_LIBS) $(SDLLIB_LIBS) $(LIBDC_LIBS) $(LIBRAW_LIBS) $(XV_LIBS) $(COR_LFS_LDFLAGS) -lgthread-2.0 $(FFMPEG_LIBS) $(X11_LIBS)
@@ -1,17 +0,0 @@
SUMMARY = "Control and capture GUI for IIDC compliant cameras"
HOMEPAGE = "http://damien.douxchamps.net/ieee1394/coriander/"
SECTION = "applications"
LICENSE = "GPL-3.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "gtk+ libgnomeui libraw1394 libdc1394 libxv tiff"
PNBLACKLIST[coriander] ?= "BROKEN: fails to use SDL probably because libsdl-config was removed, error: unknown type name 'SDL_Overlay' - the recipe will be removed on 2017-09-01 unless the issue is fixed"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/coriander-2/${PV}/${BP}.tar.gz \
file://cross-compile.patch \
"
SRC_URI[md5sum] = "431d98fb013217681f97ade168201fb8"
SRC_URI[sha256sum] = "5c7fd31cb58d398e2742352bf1ffbd2ca22e06686c6668ecfd437735c2b79123"
inherit autotools gettext
@@ -1,34 +0,0 @@
gst-ffmpeg: aacdec: check channel count
Prevent out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/aacdec.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 239153a..6c17c33 100644
--- a/gst-libs/ext/libav/libavcodec/aacdec.c
+++ b/gst-libs/ext/libav/libavcodec/aacdec.c
@@ -914,6 +914,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
}
}
+ if (avctx->channels > MAX_CHANNELS) {
+ av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
+ return AVERROR_INVALIDDATA;
+ }
+
AAC_INIT_VLC_STATIC( 0, 304);
AAC_INIT_VLC_STATIC( 1, 270);
AAC_INIT_VLC_STATIC( 2, 550);
--
1.7.5.4
@@ -1,30 +0,0 @@
From e0884eadf6a15e93142131b695f48776f9a0ac31 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sat, 10 Nov 2012 17:14:04 +0100
Subject: [PATCH] alac: fix nb_samples < order case
Upstream-Status: Backport
Commit e0884eadf6a15e93142131b695f48776f9a0ac31 release/1.0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fd4f4923cce6a2cbf4f48640b4ac706e614a1594)
---
libavcodec/alac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 9cd1737..e8e844a 100644
--- a/gst-libs/ext/libav/libavcodec/alac.c
+++ b/gst-libs/ext/libav/libavcodec/alac.c
@@ -278,7 +278,7 @@ static void predictor_decompress_fir_ada
/* read warm-up samples */
if (predictor_coef_num > 0)
- for (i = 0; i < predictor_coef_num; i++) {
+ for (i = 0; i < predictor_coef_num && i < output_size; i++) {
int32_t val;
val = buffer_out[i] + error_buffer[i+1];
--
@@ -1,61 +0,0 @@
From 6df0d3e2916c223dbe4262bf1b876dff1cb3f980 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Wed, 12 Dec 2012 12:28:45 +0100
Subject: [PATCH] alsdec: check block length
Upstream-Status: Backport
Commit 6df0d3e2916c223dbe4262bf1b876dff1cb3f980 release/1.0
Fix writing over the end
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0ceca269b66ec12a23bf0907bd2c220513cdbf16)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/alsdec.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 46dd0b4..1095b01 100644
--- a/gst-libs/ext/libav/libavcodec/alsdec.c
+++ b/gst-libs/ext/libav/libavcodec/alsdec.c
@@ -552,12 +552,15 @@ static void get_block_sizes(ALSDecContext *ctx, unsigned int *div_blocks,
/** Read the block data for a constant block
*/
-static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
+static int read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
ALSSpecificConfig *sconf = &ctx->sconf;
AVCodecContext *avctx = ctx->avctx;
GetBitContext *gb = &ctx->gb;
+ if (bd->block_length <= 0)
+ return -1;
+
*bd->raw_samples = 0;
*bd->const_block = get_bits1(gb); // 1 = constant value, 0 = zero block (silence)
bd->js_blocks = get_bits1(gb);
@@ -572,6 +575,8 @@ static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
// ensure constant block decoding by reusing this field
*bd->const_block = 1;
+
+ return 0;
}
@@ -971,7 +976,8 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
if (read_var_block_data(ctx, bd))
return -1;
} else {
- read_const_block_data(ctx, bd);
+ if (read_const_block_data(ctx, bd) < 0)
+ return -1;
}
return 0;
--
@@ -1,37 +0,0 @@
From 2502914c5f8eb77659d7c0868396862557a63245 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 9 Nov 2012 13:26:20 +0100
Subject: [PATCH] atrac3dec: Check coding mode against channels.
Upstream-Status: Backport
Commit 2502914c5f8eb77659d7c0868396862557a63245 release/1.0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 13451f5520ce6b0afde861b2285dda659f8d4fb4)
Conflicts:
libavcodec/atrac3.c
---
libavcodec/atrac3.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 7d076be..1da4c78 100644
--- a/gst-libs/ext/libav/libavcodec/atrac3.c
+++ b/gst-libs/ext/libav/libavcodec/atrac3.c
@@ -955,6 +955,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
}
/* Check the extradata. */
+ if (q->codingMode == JOINT_STEREO && avctx->channels < 2) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (q->atrac3version != 4) {
av_log(avctx,AV_LOG_ERROR,"Version %d != 4.\n",q->atrac3version);
return AVERROR_INVALIDDATA;
--
@@ -1,40 +0,0 @@
From a99aff4e4bbef8e64b51f267cd1769214e1b4e80 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 30 Aug 2013 23:40:47 +0200
Subject: [PATCH] avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 454a11a1c9c686c78aa97954306fb63453299760)
Upstream-Status: Backport
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/dsputil.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 53dc2eb..6264832 100644
--- a/gst-libs/ext/libav/libavcodec/dsputil.c
+++ b/gst-libs/ext/libav/libavcodec/dsputil.c
@@ -1912,7 +1912,7 @@ void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type){
static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
long i;
- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
long a = *(long*)(src+i);
long b = *(long*)(dst+i);
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
@@ -1937,7 +1937,7 @@ static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
}
}else
#endif
- for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
+ for(i=0; i<=w-(int)sizeof(long); i+=sizeof(long)){
long a = *(long*)(src1+i);
long b = *(long*)(src2+i);
*(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
--
1.7.5.4
@@ -1,50 +0,0 @@
From 573d5fdedae72bf59d8c0b0766fdee171063d36f Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 16 Feb 2014 23:08:52 +0100
Subject: [PATCH] avcodec/msrle: use av_image_get_linesize() to calculate the
linesize
Upstream-Status: Backport
Commit 573d5fdedae72bf59d8c0b0766fdee171063d36f release/0.9
Fixes out of array access
Fixes: 14a74a0a2dc67ede543f0e35d834fbbe-asan_heap-oob_49572c_556_cov_215466444_44_001_engine_room.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c919e1ca2ecfc47d796382973ba0e48b8f6f92a2)
Conflicts:
libavcodec/msrle.c
(cherry picked from commit bc1c8ec5e65098fd2ccd8456f667151dfc9cda42)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/msrle.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index 30159bb..c39ae7b 100644
--- a/gst-libs/ext/libav/libavcodec/msrle.c
+++ b/gst-libs/ext/libav/libavcodec/msrle.c
@@ -35,6 +35,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "msrledec.h"
+#include "libavutil/imgutils.h"
typedef struct MsrleContext {
AVCodecContext *avctx;
@@ -107,7 +108,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
/* FIXME how to correctly detect RLE ??? */
if (avctx->height * istride == avpkt->size) { /* assume uncompressed */
- int linesize = avctx->width * avctx->bits_per_coded_sample / 8;
+ int linesize = av_image_get_linesize(avctx->pix_fmt, avctx->width, 0);
uint8_t *ptr = s->frame.data[0];
uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
int i, j;
--
1.7.5.4
@@ -1,50 +0,0 @@
gst-ffmpeg: avcodec/parser: reset indexes on realloc failure
Fixes Ticket2982
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/parser.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 2c6de6e..66eca06 100644
--- a/gst-libs/ext/libav/libavcodec/parser.c
+++ b/gst-libs/ext/libav/libavcodec/parser.c
@@ -241,8 +241,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
if(next == END_NOT_FOUND){
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
- if(!new_buffer)
+ if(!new_buffer) {
+ pc->index = 0;
return AVERROR(ENOMEM);
+ }
pc->buffer = new_buffer;
memcpy(&pc->buffer[pc->index], *buf, *buf_size);
pc->index += *buf_size;
@@ -255,9 +257,11 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
/* append to buffer */
if(pc->index){
void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
-
- if(!new_buffer)
+ if(!new_buffer) {
+ pc->overread_index =
+ pc->index = 0;
return AVERROR(ENOMEM);
+ }
pc->buffer = new_buffer;
if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
memcpy(&pc->buffer[pc->index], *buf,
--
1.7.5.4
@@ -1,81 +0,0 @@
gst-ffmpeg: avcodec/rpza: Perform pointer advance and checks before
using the pointers
Fixes out of array accesses
Fixes Ticket2850
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Upstream-Status: Backport
Singed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/rpza.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index 635b406..f291a95 100644
--- a/gst-libs/ext/libav/libavcodec/rpza.c
+++ b/gst-libs/ext/libav/libavcodec/rpza.c
@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
unsigned short *pixels = (unsigned short *)s->frame.data[0];
int row_ptr = 0;
- int pixel_ptr = 0;
+ int pixel_ptr = -4;
int block_ptr;
int pixel_x, pixel_y;
int total_blocks;
@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
colorA = AV_RB16 (&s->buf[stream_ptr]);
stream_ptr += 2;
while (n_blocks--) {
+ ADVANCE_BLOCK()
block_ptr = row_ptr + pixel_ptr;
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
for (pixel_x = 0; pixel_x < 4; pixel_x++){
@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
}
block_ptr += row_inc;
}
- ADVANCE_BLOCK();
}
break;
@@ -184,6 +184,7 @@ static void rpza_decode_stream(RpzaContext *s)
color4[2] |= ((21 * ta + 11 * tb) >> 5);
while (n_blocks--) {
+ ADVANCE_BLOCK();
block_ptr = row_ptr + pixel_ptr;
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
index = s->buf[stream_ptr++];
@@ -194,12 +195,12 @@ static void rpza_decode_stream(RpzaContext *s)
}
block_ptr += row_inc;
}
- ADVANCE_BLOCK();
}
break;
/* Fill block with 16 colors */
case 0x00:
+ ADVANCE_BLOCK();
block_ptr = row_ptr + pixel_ptr;
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
for (pixel_x = 0; pixel_x < 4; pixel_x++){
@@ -213,7 +214,6 @@ static void rpza_decode_stream(RpzaContext *s)
}
block_ptr += row_inc;
}
- ADVANCE_BLOCK();
break;
/* Unknown opcode */
--
1.7.5.4
@@ -1,32 +0,0 @@
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
@@ -1,69 +0,0 @@
From 12770701856a05b6b3cd706f708f8e9a4e8a1336 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Thu, 13 Feb 2014 13:59:51 +0100
Subject: [PATCH] avformat/mpegtsenc: Check data array size in
mpegts_write_pmt()
Upstream-Status: Backport
COmmit 12770701856a05b6b3cd706f708f8e9a4e8a1336 release/0.11
Prevents out of array writes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 842b6c14bcfc1c5da1a2d288fd65386eb8c158ad)
Conflicts:
libavformat/mpegtsenc.c
(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavformat/mpegtsenc.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 793e205..a12d19f 100644
--- a/gst-libs/ext/libav/libavformat/mpegtsenc.c
+++ b/gst-libs/ext/libav/libavformat/mpegtsenc.c
@@ -240,7 +240,7 @@ static void mpegts_write_pat(AVFormatContext *s)
data, q - data);
}
-static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
+static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
{
// MpegTSWrite *ts = s->priv_data;
uint8_t data[1012], *q, *desc_length_ptr, *program_info_length_ptr;
@@ -293,6 +293,10 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
stream_type = STREAM_TYPE_PRIVATE_DATA;
break;
}
+
+ if (q - data > sizeof(data) - 32)
+ return AVERROR(EINVAL);
+
*q++ = stream_type;
put16(&q, 0xe000 | ts_st->pid);
desc_length_ptr = q;
@@ -324,7 +328,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
len_ptr = q++;
*len_ptr = 0;
- for (p = lang->value; next && *len_ptr < 255 / 4 * 4; p = next + 1) {
+ for (p = lang->value; next && *len_ptr < 255 / 4 * 4 && q - data < sizeof(data) - 4; p = next + 1) {
next = strchr(p, ',');
if (strlen(p) != 3 && (!next || next != p + 3))
continue; /* not a 3-letter code */
@@ -386,6 +390,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
}
mpegts_write_section1(&service->pmt, PMT_TID, service->sid, 0, 0, 0,
data, q - data);
+ return 0;
}
/* NOTE: str == NULL is accepted for an empty string */
--
1.7.5.4
@@ -1,29 +0,0 @@
From 63ac64864c6e0e84355aa3caa5b92208997a9a8d Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sat, 17 Nov 2012 16:26:55 +0100
Subject: [PATCH] eamad: fix out of array accesses
Upstream-Status: Backport
Commit 63ac64864c6e0e84355aa3caa5b92208997a9a8d release/1.1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/eamad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 2805195..e38650e 100644
--- a/gst-libs/ext/libav/libavcodec/eamad.c
+++ b/gst-libs/ext/libav/libavcodec/eamad.c
@@ -237,7 +237,7 @@ static int decode_frame(AVCodecContext *avctx,
int chunk_type;
int inter;
- if (buf_size < 17) {
+ if (buf_size < 26) {
av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
*data_size = 0;
return -1;
--
@@ -1,29 +0,0 @@
gst-ffmpeg: error concealment: initialize block index.
Fixes CVE-2011-3941 (out of bounds write)
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/error_resilience.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 8bb5d0c..d55c000 100644
--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
@@ -45,6 +45,9 @@ static void decode_mb(MpegEncContext *s, int ref){
s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift);
+ ff_init_block_index(s);
+ ff_update_block_index(s);
+
if(CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264){
H264Context *h= (void*)s;
h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
--
1.7.5.4
@@ -1,37 +0,0 @@
gst-ffmpeg: error_concealment: Check that the picture is not in a half
Fixes state becoming inconsistent
Fixes a null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/error_resilience.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 01f7424..2b6bc42 100644
--- a/gst-libs/ext/libav/libavcodec/error_resilience.c
+++ b/gst-libs/ext/libav/libavcodec/error_resilience.c
@@ -793,6 +793,12 @@ void ff_er_frame_end(MpegEncContext *s){
s->picture_structure != PICT_FRAME || // we dont support ER of field pictures yet, though it should not crash if enabled
s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
+ if ( s->picture_structure == PICT_FRAME
+ && s->current_picture.linesize[0] != s->current_picture_ptr->linesize[0]) {
+ av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
+ return;
+ }
+
if(s->current_picture.motion_val[0] == NULL){
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
--
1.7.5.4
@@ -1,36 +0,0 @@
gst-ffmpeg: ffserver: set oformat
Fix Ticket1986
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)
Upstream-Status: Backport
---
ffserver.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index 4044d0f..8740140 100644
--- a/gst-libs/ext/libav/ffserver.c
+++ b/gst-libs/ext/libav/ffserver.c
@@ -2937,12 +2937,14 @@ static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
{
AVFormatContext *avc;
AVStream *avs = NULL;
+ AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
int i;
avc = avformat_alloc_context();
- if (avc == NULL) {
+ if (avc == NULL || !rtp_format) {
return -1;
}
+ avc->oformat = rtp_format;
av_dict_set(&avc->metadata, "title",
stream->title[0] ? stream->title : "No Title", 0);
avc->nb_streams = stream->nb_streams;
--
1.7.5.4
@@ -1,29 +0,0 @@
From d6c184880ee2e09fd68c0ae217173832cee5afc1 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 18 Nov 2012 16:29:04 +0100
Subject: [PATCH] h264: correct ref count check and limit, fix out of array
accesses.
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/h264.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index da43f1e..32cede5 100644
--- a/gst-libs/ext/libav/libavcodec/h264.c
+++ b/gst-libs/ext/libav/libavcodec/h264.c
@@ -2870,6 +2870,9 @@ static int decode_slice_header(H264Conte
h->ref_count[0]= get_ue_golomb(&s->gb) + 1;
if(h->slice_type_nos==AV_PICTURE_TYPE_B)
h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
+ else
+ // full range is spec-ok in this case, even for frames
+ h->ref_count[1] = 1;
if(h->ref_count[0]-1 > 32-1 || h->ref_count[1]-1 > 32-1){
av_log(h->s.avctx, AV_LOG_ERROR, "reference overflow\n");
--
@@ -1,145 +0,0 @@
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);
@@ -1,33 +0,0 @@
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
@@ -1,39 +0,0 @@
gst-ffmpeg: h264_sei: Fix infinite loop.
Fixsot yet fixed parts of CVE-2011-3946.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/h264_sei.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 374e53d..80d70e5 100644
--- a/gst-libs/ext/libav/libavcodec/h264_sei.c
+++ b/gst-libs/ext/libav/libavcodec/h264_sei.c
@@ -169,11 +169,15 @@ int ff_h264_decode_sei(H264Context *h){
type=0;
do{
+ if (get_bits_left(&s->gb) < 8)
+ return -1;
type+= show_bits(&s->gb, 8);
}while(get_bits(&s->gb, 8) == 255);
size=0;
do{
+ if (get_bits_left(&s->gb) < 8)
+ return -1;
size+= show_bits(&s->gb, 8);
}while(get_bits(&s->gb, 8) == 255);
--
1.7.5.4
@@ -1,87 +0,0 @@
From b666debffec1fcbb19ef377635a53b9a58bca8a4 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Tue, 29 Jan 2013 18:29:41 +0100
Subject: [PATCH] huffyuvdec: Check init_vlc() return codes.
Upstream-Status: Backport
Commit b666debffec1fcbb19ef377635a53b9a58bca8a4 release/1.0
Prevents out of array writes
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f67a0d115254461649470452058fa3c28c0df294)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/huffyuv.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 58da789..993e524 100644
--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
@@ -33,6 +33,7 @@
#include "put_bits.h"
#include "dsputil.h"
#include "thread.h"
+#include "libavutil/avassert.h"
#define VLC_BITS 11
@@ -287,6 +287,7 @@ static void generate_joint_tables(HYuvCo
int len1 = s->len[p][u];
if (len1 > limit || !len1)
continue;
+ av_assert0(i < (1 << VLC_BITS));
len[i] = len0 + len1;
bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
symbols[i] = (y<<8) + u;
@@ -320,6 +321,7 @@ static void generate_joint_tables(HYuvCo
int len2 = s->len[2][r&255];
if (len2 > limit1 || !len2)
continue;
+ av_assert0(i < (1 << VLC_BITS));
len[i] = len0 + len1 + len2;
bits[i] = (code << len2) + s->bits[2][r&255];
if(s->decorrelate){
@@ -343,6 +345,7 @@ static void generate_joint_tables(HYuvCo
static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
GetBitContext gb;
int i;
+ int ret;
init_get_bits(&gb, src, length*8);
@@ -353,7 +356,9 @@ static int read_huffman_tables(HYuvConte
return -1;
}
free_vlc(&s->vlc[i]);
- init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
+ if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
+ s->bits[i], 4, 4, 0)) < 0)
+ return ret;
}
generate_joint_tables(s);
@@ -365,6 +370,7 @@ static int read_old_huffman_tables(HYuvC
#if 1
GetBitContext gb;
int i;
+ int ret;
init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8);
if(read_len_table(s->len[0], &gb)<0)
@@ -385,7 +391,9 @@ static int read_old_huffman_tables(HYuvC
for(i=0; i<3; i++){
free_vlc(&s->vlc[i]);
- init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
+ if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
+ s->bits[i], 4, 4, 0)) < 0)
+ return ret;
}
generate_joint_tables(s);
--
@@ -1,61 +0,0 @@
From db0f7f7394e1f994ed38db043f78ed0f10bde0da Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Tue, 29 Jan 2013 19:22:33 +0100
Subject: [PATCH] huffyuvdec: Skip len==0 cases
Upstream-Status: Backport
Commit db0f7f7394e1f994ed38db043f78ed0f10bde0da release/1.0
Fixes vlc decoding for hypothetical files that would contain such cases.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0dfc01c2bbf4b71bb56201bc4a393321e15d1b31)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/huffyuv.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 993e524..72ed351 100644
--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
@@ -281,11 +281,11 @@ static void generate_joint_tables(HYuvCo
for(i=y=0; y<256; y++){
int len0 = s->len[0][y];
int limit = VLC_BITS - len0;
- if(limit <= 0)
+ if(limit <= 0 || !len0)
continue;
for(u=0; u<256; u++){
int len1 = s->len[p][u];
- if(len1 > limit)
+ if (len1 > limit || !len1)
continue;
len[i] = len0 + len1;
bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
@@ -308,17 +308,17 @@ static void generate_joint_tables(HYuvCo
for(i=0, g=-16; g<16; g++){
int len0 = s->len[p0][g&255];
int limit0 = VLC_BITS - len0;
- if(limit0 < 2)
+ if (limit0 < 2 || !len0)
continue;
for(b=-16; b<16; b++){
int len1 = s->len[p1][b&255];
int limit1 = limit0 - len1;
- if(limit1 < 1)
+ if (limit1 < 1 || !len1)
continue;
code = (s->bits[p0][g&255] << len1) + s->bits[p1][b&255];
for(r=-16; r<16; r++){
int len2 = s->len[2][r&255];
- if(len2 > limit1)
+ if (len2 > limit1 || !len2)
continue;
len[i] = len0 + len1 + len2;
bits[i] = (code << len2) + s->bits[2][r&255];
--
1.8.5.2.233.g932f7e4
@@ -1,45 +0,0 @@
gst-ffmpeg: lavf: compute probe buffer size more reliably.
The previous code computes the offset by reversing the growth
of the allocated buffer size: it is complex and did lead to
inconsistencies when the size limit is reached.
Fix trac ticket #1991.
(cherry picked from commit 03847eb8259291b4ff1bd840bd779d0699d71f96)
Conflicts:
libavformat/utils.c
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavformat/utils.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7940037..be73c4a 100644
--- a/gst-libs/ext/libav/libavformat/utils.c
+++ b/gst-libs/ext/libav/libavformat/utils.c
@@ -459,7 +459,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
{
AVProbeData pd = { filename ? filename : "", NULL, -offset };
unsigned char *buf = NULL;
- int ret = 0, probe_size;
+ int ret = 0, probe_size, buf_offset = 0;
if (!max_probe_size) {
max_probe_size = PROBE_BUF_MAX;
@@ -499,7 +499,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
score = 0;
ret = 0; /* error was end of file, nothing read */
}
- pd.buf_size += ret;
+ pd.buf_size = buf_offset += ret;
pd.buf = &buf[offset];
memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
--
1.7.5.4
@@ -1,32 +0,0 @@
From 1f41cffe1e3e79620f587545bdfcbd7e6e68ed29 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 11 Nov 2012 00:01:24 +0100
Subject: [PATCH] mjpegdec: check SE.
Upstream-Status: Backport
Commit 1f41cffe1e3e79620f587545bdfcbd7e6e68ed29 release/1.1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/mjpegdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6b5266d..0a71a6f 100644
--- a/gst-libs/ext/libav/libavcodec/mjpegdec.c
+++ b/gst-libs/ext/libav/libavcodec/mjpegdec.c
@@ -905,6 +905,11 @@ static int mjpeg_decode_scan_progressive
int16_t *quant_matrix = s->quant_matrixes[ s->quant_index[c] ];
GetBitContext mb_bitmask_gb;
+ if (se > 63) {
+ av_log(s->avctx, AV_LOG_ERROR, "SE %d is too large\n", se);
+ return AVERROR_INVALIDDATA;
+ }
+
if (mb_bitmask) {
init_get_bits(&mb_bitmask_gb, mb_bitmask, s->mb_width*s->mb_height);
}
--
@@ -1,34 +0,0 @@
From 28bf685bfc6d0c744369cdf367f61a78d80d0b01 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Thu, 15 Nov 2012 16:41:28 +0100
Subject: [PATCH] pgssubdec: check RLE size before copying. Fix out of array
accesses
Upstream-Status: Backport
Commit 28bf685bfc6d0c744369cdf367f61a78d80d0b01 release/1.1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c0d68be555f5858703383040e04fcd6529777061)
---
libavcodec/pgssubdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index 728f178..26a3c2a 100644
--- a/gst-libs/ext/libav/libavcodec/pgssubdec.c
+++ b/gst-libs/ext/libav/libavcodec/pgssubdec.c
@@ -202,6 +202,11 @@ static int parse_picture_segment(AVCodec
return -1;
}
+ if (buf_size > rle_bitmap_len) {
+ av_log(avctx, AV_LOG_ERROR, "too much RLE data\n");
+ return AVERROR_INVALIDDATA;
+ }
+
ctx->picture.w = width;
ctx->picture.h = height;
--
@@ -1,44 +0,0 @@
gst-ffmpeg: pngdec/filter: dont access out of array elements at the end
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/pngdec.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 97c0ad1..193e35e 100644
--- a/gst-libs/ext/libav/libavcodec/pngdec.c
+++ b/gst-libs/ext/libav/libavcodec/pngdec.c
@@ -190,7 +190,7 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
if(bpp >= 2) g = dst[1];\
if(bpp >= 3) b = dst[2];\
if(bpp >= 4) a = dst[3];\
- for(; i < size; i+=bpp) {\
+ for(; i <= size - bpp; i+=bpp) {\
dst[i+0] = r = op(r, src[i+0], last[i+0]);\
if(bpp == 1) continue;\
dst[i+1] = g = op(g, src[i+1], last[i+1]);\
@@ -206,13 +206,9 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
else if(bpp == 2) UNROLL1(2, op)\
else if(bpp == 3) UNROLL1(3, op)\
else if(bpp == 4) UNROLL1(4, op)\
- else {\
- for (; i < size; i += bpp) {\
- int j;\
- for (j = 0; j < bpp; j++)\
- dst[i+j] = op(dst[i+j-bpp], src[i+j], last[i+j]);\
- }\
- }
+ for (; i < size; i++) {\
+ dst[i] = op(dst[i-bpp], src[i], last[i]);\
+ }\
/* NOTE: 'dst' can be equal to 'last' */
static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
--
1.7.5.4
@@ -1,30 +0,0 @@
gst-ffmpeg: qdm2: check array index before use, fix out of array
accesses
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/qdm2.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 4cf4b2f..1dfb8d5 100644
--- a/gst-libs/ext/libav/libavcodec/qdm2.c
+++ b/gst-libs/ext/libav/libavcodec/qdm2.c
@@ -1257,6 +1257,11 @@ static void qdm2_decode_super_block (QDM2Context *q)
for (i = 0; packet_bytes > 0; i++) {
int j;
+ if (i>=FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
+ SAMPLES_NEEDED_2("too many packet bytes");
+ return;
+ }
+
q->sub_packet_list_A[i].next = NULL;
if (i > 0) {
--
1.7.5.4
@@ -1,58 +0,0 @@
gst-ffmpeg: qdm2dec: fix buffer overflow. Fixes NGS00144
This also adds a few lines of code from master that are needed for this fix.
Thanks to Phillip for suggestions to improve the patch.
Found-by: Phillip Langlois
Upstream-Status: Backport
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/qdm2.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 3aa9e5b..e000df8 100644
--- a/gst-libs/ext/libav/libavcodec/qdm2.c
+++ b/gst-libs/ext/libav/libavcodec/qdm2.c
@@ -76,6 +76,7 @@ do { \
#define SAMPLES_NEEDED_2(why) \
av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why);
+#define QDM2_MAX_FRAME_SIZE 512
typedef int8_t sb_int8_array[2][30][64];
@@ -168,7 +169,7 @@ typedef struct {
/// I/O data
const uint8_t *compressed_data;
int compressed_size;
- float output_buffer[1024];
+ float output_buffer[QDM2_MAX_FRAME_SIZE * MPA_MAX_CHANNELS * 2];
/// Synthesis filter
MPADSPContext mpadsp;
@@ -1819,6 +1820,9 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
s->group_order = av_log2(s->group_size) + 1;
s->frame_size = s->group_size / 16; // 16 iterations per super block
+ if (s->frame_size > QDM2_MAX_FRAME_SIZE)
+ return AVERROR_INVALIDDATA;
+
s->sub_sampling = s->fft_order - 7;
s->frequency_range = 255 / (1 << (2 - s->sub_sampling));
@@ -1887,6 +1891,9 @@ static int qdm2_decode (QDM2Context *q, const uint8_t *in, int16_t *out)
int ch, i;
const int frame_size = (q->frame_size * q->channels);
+ if((unsigned)frame_size > FF_ARRAY_ELEMS(q->output_buffer)/2)
+ return -1;
+
/* select input buffer */
q->compressed_data = in;
q->compressed_size = q->checksum_size;
--
1.7.5.4
@@ -1,36 +0,0 @@
From 391e0fc6c90ced6656b74f50f3a487b6dc76ea63 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Thu, 29 Nov 2012 15:18:17 +0100
Subject: [PATCH] roqvideodec: check dimensions validity
Upstream-Status: Backport
Commit 391e0fc6c90ced6656b74f50f3a487b6dc76ea63 release/0.7
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ae610451170cd5a28b33950006ff0bd23036845)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/roqvideodec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
index f0977f6..4e34231 100644
--- a/gst-libs/ext/libav/libavcodec/roqvideodec.c
+++ b/gst-libs/ext/libav/libavcodec/roqvideodec.c
@@ -157,6 +157,12 @@ static av_cold int roq_decode_init(AVCodecContext *avctx)
RoqContext *s = avctx->priv_data;
s->avctx = avctx;
+
+ if (avctx->width%16 || avctx->height%16) {
+ av_log_ask_for_sample(avctx, "dimensions not being a multiple of 16 are unsupported\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
s->width = avctx->width;
s->height = avctx->height;
avcodec_get_frame_defaults(&s->frames[0]);
--
@@ -1,32 +0,0 @@
gst-ffmpeg: smackerdec: Check that the last indexes are within the
table.
Fixes CVE-2011-3944
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/smacker.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 30f99b4..2a8bae8 100644
--- a/gst-libs/ext/libav/libavcodec/smacker.c
+++ b/gst-libs/ext/libav/libavcodec/smacker.c
@@ -259,6 +259,11 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
if(ctx.last[0] == -1) ctx.last[0] = huff.current++;
if(ctx.last[1] == -1) ctx.last[1] = huff.current++;
if(ctx.last[2] == -1) ctx.last[2] = huff.current++;
+ if(huff.current > huff.length){
+ ctx.last[0] = ctx.last[1] = ctx.last[2] = 1;
+ av_log(smk->avctx, AV_LOG_ERROR, "bigtree damaged\n");
+ return -1;
+ }
*recodes = huff.values;
--
1.7.5.4
@@ -1,32 +0,0 @@
gst-ffmpeg: vp3: Copy all 3 frames for thread updates.
This fixes a double release of the current frame on deinit.
Fixes CVE-2011-3934
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Upstream-Status: Backport
Signed-off-by: Yue.Tao <yue.tao@windriver.com>
---
libavcodec/vp3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 738ae9f..b5daafc 100644
--- a/gst-libs/ext/libav/libavcodec/vp3.c
+++ b/gst-libs/ext/libav/libavcodec/vp3.c
@@ -1859,7 +1859,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
||s->width != s1->width
||s->height!= s1->height) {
if (s != s1)
- copy_fields(s, s1, golden_frame, current_frame);
+ copy_fields(s, s1, golden_frame, keyframe);
return -1;
}
--
1.7.5.4
@@ -1,183 +0,0 @@
gst-ffmpeg: vp3: fix oob read for negative tokens and memleaks on error.
Upstream-Status: Backport
Signed-off-by: Yue.Tao <yue.tao@windriver.com>
---
libavcodec/vp3.c | 59 +++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 14 deletions(-)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 36715bb..ce14e63 100644
--- a/gst-libs/ext/libav/libavcodec/vp3.c
+++ b/gst-libs/ext/libav/libavcodec/vp3.c
@@ -45,6 +45,7 @@
#define FRAGMENT_PIXELS 8
static av_cold int vp3_decode_end(AVCodecContext *avctx);
+static void vp3_decode_flush(AVCodecContext *avctx);
//FIXME split things out into their own arrays
typedef struct Vp3Fragment {
@@ -890,7 +891,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
/* decode a VLC into a token */
token = get_vlc2(gb, vlc_table, 11, 3);
/* use the token to get a zero run, a coefficient, and an eob run */
- if (token <= 6) {
+ if ((unsigned) token <= 6U) {
eob_run = eob_run_base[token];
if (eob_run_get_bits[token])
eob_run += get_bits(gb, eob_run_get_bits[token]);
@@ -908,7 +909,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
coeff_i += eob_run;
eob_run = 0;
}
- } else {
+ } else if (token >= 0) {
bits_to_get = coeff_get_bits[token];
if (bits_to_get)
bits_to_get = get_bits(gb, bits_to_get);
@@ -942,6 +943,10 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
for (i = coeff_index+1; i <= coeff_index+zero_run; i++)
s->num_coded_frags[plane][i]--;
coeff_i++;
+ } else {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "Invalid token %d\n", token);
+ return -1;
}
}
@@ -991,6 +996,8 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
/* unpack the Y plane DC coefficients */
residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_y_table], 0,
0, residual_eob_run);
+ if (residual_eob_run < 0)
+ return residual_eob_run;
/* reverse prediction of the Y-plane DC coefficients */
reverse_dc_prediction(s, 0, s->fragment_width[0], s->fragment_height[0]);
@@ -998,8 +1005,12 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
/* unpack the C plane DC coefficients */
residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
1, residual_eob_run);
+ if (residual_eob_run < 0)
+ return residual_eob_run;
residual_eob_run = unpack_vlcs(s, gb, &s->dc_vlc[dc_c_table], 0,
2, residual_eob_run);
+ if (residual_eob_run < 0)
+ return residual_eob_run;
/* reverse prediction of the C-plane DC coefficients */
if (!(s->avctx->flags & CODEC_FLAG_GRAY))
@@ -1036,11 +1047,17 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
for (i = 1; i <= 63; i++) {
residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
0, residual_eob_run);
+ if (residual_eob_run < 0)
+ return residual_eob_run;
residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
1, residual_eob_run);
+ if (residual_eob_run < 0)
+ return residual_eob_run;
residual_eob_run = unpack_vlcs(s, gb, c_tables[i], i,
2, residual_eob_run);
+ if (residual_eob_run < 0)
+ return residual_eob_run;
}
return 0;
@@ -1777,10 +1794,15 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data;
int qps_changed = 0, i, err;
+#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
+
if (!s1->current_frame.data[0]
||s->width != s1->width
- ||s->height!= s1->height)
+ ||s->height!= s1->height) {
+ if (s != s1)
+ copy_fields(s, s1, golden_frame, current_frame);
return -1;
+ }
if (s != s1) {
// init tables if the first frame hasn't been decoded
@@ -1796,8 +1818,6 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *
memcpy(s->motion_val[1], s1->motion_val[1], c_fragment_count * sizeof(*s->motion_val[1]));
}
-#define copy_fields(to, from, start_field, end_field) memcpy(&to->start_field, &from->start_field, (char*)&to->end_field - (char*)&to->start_field)
-
// copy previous frame data
copy_fields(s, s1, golden_frame, dsp);
@@ -1987,9 +2007,6 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
Vp3DecodeContext *s = avctx->priv_data;
int i;
- if (avctx->is_copy && !s->current_frame.data[0])
- return 0;
-
av_free(s->superblock_coding);
av_free(s->all_fragments);
av_free(s->coded_fragment_list[0]);
@@ -2016,12 +2033,7 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
free_vlc(&s->motion_vector_vlc);
/* release all frames */
- if (s->golden_frame.data[0])
- ff_thread_release_buffer(avctx, &s->golden_frame);
- if (s->last_frame.data[0] && s->last_frame.type != FF_BUFFER_TYPE_COPY)
- ff_thread_release_buffer(avctx, &s->last_frame);
- /* no need to release the current_frame since it will always be pointing
- * to the same frame as either the golden or last frame */
+ vp3_decode_flush(avctx);
return 0;
}
@@ -2341,6 +2353,23 @@ static void vp3_decode_flush(AVCodecContext *avctx)
ff_thread_release_buffer(avctx, &s->current_frame);
}
+static int vp3_init_thread_copy(AVCodecContext *avctx)
+{
+ Vp3DecodeContext *s = avctx->priv_data;
+
+ s->superblock_coding = NULL;
+ s->all_fragments = NULL;
+ s->coded_fragment_list[0] = NULL;
+ s->dct_tokens_base = NULL;
+ s->superblock_fragments = NULL;
+ s->macroblock_coding = NULL;
+ s->motion_val[0] = NULL;
+ s->motion_val[1] = NULL;
+ s->edge_emu_buffer = NULL;
+
+ return 0;
+}
+
AVCodec ff_theora_decoder = {
.name = "theora",
.type = AVMEDIA_TYPE_VIDEO,
@@ -2352,6 +2381,7 @@ AVCodec ff_theora_decoder = {
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
.flush = vp3_decode_flush,
.long_name = NULL_IF_CONFIG_SMALL("Theora"),
+ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
};
#endif
@@ -2367,5 +2397,6 @@ AVCodec ff_vp3_decoder = {
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_FRAME_THREADS,
.flush = vp3_decode_flush,
.long_name = NULL_IF_CONFIG_SMALL("On2 VP3"),
+ .init_thread_copy = ONLY_IF_THREADS_ENABLED(vp3_init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp3_update_thread_context)
};
--
1.7.5.4
@@ -1,51 +0,0 @@
From 2cac35086c9e103fa98960c546d5017e7363803a Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 25 Jan 2013 06:11:59 +0100
Subject: [PATCH] vqavideo: check chunk sizes before reading chunks
Upstream-Status: Backport
Commit 2cac35086c9e103fa98960c546d5017e7363803a release/0.7
Fixes out of array writes
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
libavcodec/vqavideo.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index d1eab5b..6e1ce6c 100644
--- a/gst-libs/ext/libav/libavcodec/vqavideo.c
+++ b/gst-libs/ext/libav/libavcodec/vqavideo.c
@@ -527,6 +527,11 @@ static void vqa_decode_chunk(VqaContext *s)
chunk_size = AV_RB32(&s->buf[cbp0_chunk + 4]);
cbp0_chunk += CHUNK_PREAMBLE_SIZE;
+ if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
+ av_log(s->avctx, AV_LOG_ERROR, "cbp0 chunk too large (0x%X bytes)\n", chunk_size);
+ return AVERROR_INVALIDDATA;
+ }
+
/* accumulate partial codebook */
memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
&s->buf[cbp0_chunk], chunk_size);
@@ -550,6 +555,11 @@ static void vqa_decode_chunk(VqaContext *s)
chunk_size = AV_RB32(&s->buf[cbpz_chunk + 4]);
cbpz_chunk += CHUNK_PREAMBLE_SIZE;
+ if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
+ av_log(s->avctx, AV_LOG_ERROR, "cbpz chunk too large (0x%X bytes)\n", chunk_size);
+ return AVERROR_INVALIDDATA;
+ }
+
/* accumulate partial codebook */
memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
&s->buf[cbpz_chunk], chunk_size);
--
1.7.5.4
@@ -1,68 +0,0 @@
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;
@@ -1,22 +0,0 @@
Disable yasm for libav when --disable-yasm
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Shane Wang <shane.wang@intel.com>
diff -r f2f8f74c6e30 configure.ac
--- a/configure.ac Thu Dec 22 23:56:09 2011 +0800
+++ b/configure.ac Thu Dec 22 23:57:37 2011 +0800
@@ -325,6 +325,12 @@
--enable-gpl"
fi
+ AC_ARG_ENABLE(yasm,
+ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])])
+ if test "x$enable_yasm" = "xno"; then
+ embffmpeg_configure_args="$embffmpeg_configure_args --disable-yasm"
+ fi
+
# if we are cross-compiling, tell ffmpeg so
target_os=`echo $host_os | sed 's/-gnu//'`
if test "x$cross_compiling" = xyes; then
@@ -1,100 +0,0 @@
gst-ffmpeg: Security Advisory - ffmpeg - CVE-2013-0855
Upstream-Status: Backport
Signed-off-by: Yue Tao <yue.tao@windriver.com>
diff --git a/gst-libs/ext/libav/libavcodec/alac.c.old b/gst-libs/ext/libav/libavcodec/alac.c
index 2a0df8c..bcbd56d 100644
--- a/gst-libs/ext/libav/libavcodec/alac.c.old
+++ b/gst-libs/ext/libav/libavcodec/alac.c
@@ -87,18 +87,44 @@ typedef struct {
int wasted_bits;
} ALACContext;
-static void allocate_buffers(ALACContext *alac)
+static av_cold int alac_decode_close(AVCodecContext *avctx)
+{
+ ALACContext *alac = avctx->priv_data;
+
+ int chan;
+ for (chan = 0; chan < MAX_CHANNELS; chan++) {
+ av_freep(&alac->predicterror_buffer[chan]);
+ av_freep(&alac->outputsamples_buffer[chan]);
+ av_freep(&alac->wasted_bits_buffer[chan]);
+ }
+
+ return 0;
+}
+
+static int allocate_buffers(ALACContext *alac)
{
int chan;
+ int buf_size;
+
+ if (alac->setinfo_max_samples_per_frame > INT_MAX / sizeof(int32_t))
+ goto buf_alloc_fail;
+ buf_size = alac->setinfo_max_samples_per_frame * sizeof(int32_t);
+
for (chan = 0; chan < MAX_CHANNELS; chan++) {
- alac->predicterror_buffer[chan] =
- av_malloc(alac->setinfo_max_samples_per_frame * 4);
- alac->outputsamples_buffer[chan] =
- av_malloc(alac->setinfo_max_samples_per_frame * 4);
+ FF_ALLOC_OR_GOTO(alac->avctx, alac->predicterror_buffer[chan],
+ buf_size, buf_alloc_fail);
- alac->wasted_bits_buffer[chan] = av_malloc(alac->setinfo_max_samples_per_frame * 4);
+ FF_ALLOC_OR_GOTO(alac->avctx, alac->outputsamples_buffer[chan],
+ buf_size, buf_alloc_fail);
+
+ FF_ALLOC_OR_GOTO(alac->avctx, alac->wasted_bits_buffer[chan],
+ buf_size, buf_alloc_fail);
}
+ return 0;
+buf_alloc_fail:
+ alac_decode_close(alac->avctx);
+ return AVERROR(ENOMEM);
}
static int alac_set_info(ALACContext *alac)
@@ -131,8 +157,6 @@ static int alac_set_info(ALACContext *alac)
bytestream_get_be32(&ptr); /* bitrate ? */
bytestream_get_be32(&ptr); /* samplerate */
- allocate_buffers(alac);
-
return 0;
}
@@ -659,6 +683,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
static av_cold int alac_decode_init(AVCodecContext * avctx)
{
+ int ret;
ALACContext *alac = avctx->priv_data;
alac->avctx = avctx;
alac->numchannels = alac->avctx->channels;
@@ -674,18 +699,9 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
return -1;
}
- return 0;
-}
-
-static av_cold int alac_decode_close(AVCodecContext *avctx)
-{
- ALACContext *alac = avctx->priv_data;
-
- int chan;
- for (chan = 0; chan < MAX_CHANNELS; chan++) {
- av_freep(&alac->predicterror_buffer[chan]);
- av_freep(&alac->outputsamples_buffer[chan]);
- av_freep(&alac->wasted_bits_buffer[chan]);
+ if ((ret = allocate_buffers(alac)) < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Error allocating buffers\n");
+ return ret;
}
return 0;
@@ -1,26 +0,0 @@
avcodec/cdgraphics: check buffer size before use
Fixes out of array accesses
Backported from:http://git.videolan.org/?p=ffmpeg.git;a=commit;h=ad002e1a13a8df934bd6cb2c84175a4780ab8942
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ming Liu <ming.liu@windriver.com>
diff -urpN a/gst-libs/ext/libav/libavcodec/cdgraphics.c b/gst-libs/ext/libav/libavcodec/cdgraphics.c
--- a/gst-libs/ext/libav/libavcodec/cdgraphics.c 2013-07-18 13:17:08.399876575 +0800
+++ b/gst-libs/ext/libav/libavcodec/cdgraphics.c 2013-07-18 13:18:05.880502267 +0800
@@ -291,7 +291,9 @@ static int cdg_decode_frame(AVCodecConte
inst = bytestream_get_byte(&buf);
inst &= CDG_MASK;
buf += 2; /// skipping 2 unneeded bytes
- bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
+
+ if (buf_size > CDG_HEADER_SIZE)
+ bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
if ((command & CDG_MASK) == CDG_COMMAND) {
switch (inst) {
@@ -1,64 +0,0 @@
From 8b94df0f2047e9728cb872adc9e64557b7a5152f Mon Sep 17 00:00:00 2001
From: Reinhard Tartler <siretart@tauware.de>
Date: Sun, 4 Dec 2011 10:10:33 +0100
Subject: [PATCH] vp3dec: Check coefficient index in vp3_dequant()
Based on a patch by Michael Niedermayer <michaelni@gmx.at>
Fixes NGS00145, CVE-2011-4352
Found-by: Phillip Langlois
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Upstream-Status: Backport
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=8b94df0f2047e9728cb872adc9e64557b7a5152f
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
libavcodec/vp3.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 51ab048..f44d084 100644
--- a/gst-libs/ext/libav/libavcodec/vp3.c
+++ b/gst-libs/ext/libav/libavcodec/vp3.c
@@ -1363,6 +1363,10 @@ static inline int vp3_dequant(Vp3DecodeContext *s, Vp3Fragment *frag,
case 1: // zero run
s->dct_tokens[plane][i]++;
i += (token >> 2) & 0x7f;
+ if (i > 63) {
+ av_log(s->avctx, AV_LOG_ERROR, "Coefficient index overflow\n");
+ return i;
+ }
block[perm[i]] = (token >> 9) * dequantizer[perm[i]];
i++;
break;
@@ -1566,7 +1570,10 @@ static void render_slice(Vp3DecodeContext *s, int slice)
/* invert DCT and place (or add) in final output */
if (s->all_fragments[i].coding_method == MODE_INTRA) {
- vp3_dequant(s, s->all_fragments + i, plane, 0, block);
+ int index;
+ index = vp3_dequant(s, s->all_fragments + i, plane, 0, block);
+ if (index > 63)
+ continue;
if(s->avctx->idct_algo!=FF_IDCT_VP3)
block[0] += 128<<3;
s->dsp.idct_put(
@@ -1574,7 +1581,10 @@ static void render_slice(Vp3DecodeContext *s, int slice)
stride,
block);
} else {
- if (vp3_dequant(s, s->all_fragments + i, plane, 1, block)) {
+ int index = vp3_dequant(s, s->all_fragments + i, plane, 1, block);
+ if (index > 63)
+ continue;
+ if (index > 0) {
s->dsp.idct_add(
output_plane + first_pixel,
stride,
--
2.1.1
@@ -1,38 +0,0 @@
From 2266b8bc3370856d874334ba62b337ce4f1eb255 Mon Sep 17 00:00:00 2001
From: Kai Kang <kai.kang@windriver.com>
Date: Wed, 13 May 2015 16:46:06 +0800
Subject: [PATCH 2/2] gst-ffmpeg: fix CVE-2014-7933
Upstream-Status: Backport
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=33301f00
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
gst-libs/ext/libav/libavformat/matroskadec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gst-libs/ext/libav/libavformat/matroskadec.c b/gst-libs/ext/libav/libavformat/matroskadec.c
index 59dce4f..e5f5fc1 100644
--- a/gst-libs/ext/libav/libavformat/matroskadec.c
+++ b/gst-libs/ext/libav/libavformat/matroskadec.c
@@ -1916,7 +1916,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
int64_t timestamp, int flags)
{
MatroskaDemuxContext *matroska = s->priv_data;
- MatroskaTrack *tracks = matroska->tracks.elem;
+ MatroskaTrack *tracks = NULL;
AVStream *st = s->streams[stream_index];
int i, index, index_sub, index_min;
@@ -1939,6 +1939,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
return 0;
index_min = index;
+ tracks = matroska->tracks.elem;
for (i=0; i < matroska->tracks.nb_elem; i++) {
tracks[i].audio.pkt_cnt = 0;
tracks[i].audio.sub_packet_cnt = 0;
--
1.9.1
@@ -1,38 +0,0 @@
From 105654e376a736d243aef4a1d121abebce912e6b Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 3 Oct 2014 04:30:58 +0200
Subject: [PATCH] avcodec/utils: Add case for jv to
avcodec_align_dimensions2()
(Upstream commit 105654e376a736d243aef4a1d121abebce912e6b)
Fixes out of array accesses
Fixes: asan_heap-oob_12304aa_8_asan_heap-oob_4da4f3_300_intro.jv
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d4f5532..c2c5579 100644
--- a/gst-libs/ext/libav/libavcodec/utils.c
+++ b/gst-libs/ext/libav/libavcodec/utils.c
@@ -173,6 +173,10 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int l
w_align=4;
h_align=4;
}
+ if (s->codec_id == CODEC_ID_JV){
+ w_align = 8;
+ h_align = 8;
+ }
break;
case PIX_FMT_BGR24:
if((s->codec_id == CODEC_ID_MSZH) || (s->codec_id == CODEC_ID_ZLIB)){
--
1.7.9.5
@@ -1,35 +0,0 @@
From 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 3 Oct 2014 14:45:04 +0200
Subject: [PATCH] avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
(Upstream commit 8b0e96e1f21b761ca15dbb470cd619a1ebf86c3e)
Fixes out of array access
Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/mmvideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 026d463..9ff6393 100644
--- a/gst-libs/ext/libav/libavcodec/mmvideo.c
+++ b/gst-libs/ext/libav/libavcodec/mmvideo.c
@@ -104,7 +104,7 @@ static void mm_decode_intra(MmContext * s, int half_horiz, int half_vert, const
if (color) {
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
- if (half_vert)
+ if (half_vert && y + half_vert < s->avctx->height)
memset(s->frame.data[0] + (y+1)*s->frame.linesize[0] + x, color, run_length);
}
x+= run_length;
--
1.7.9.5
@@ -1,56 +0,0 @@
From e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 3 Oct 2014 16:08:32 +0200
Subject: [PATCH] avcodec/tiff: more completely check bpp/bppcount
(Upstream commit e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5)
Fixes pixel format selection
Fixes out of array accesses
Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/tiff.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 6e2096f..0870e31 100644
--- a/gst-libs/ext/libav/libavcodec/tiff.c
+++ b/gst-libs/ext/libav/libavcodec/tiff.c
@@ -324,11 +324,11 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
s->height = value;
break;
case TIFF_BPP:
- s->bppcount = count;
- if(count > 4){
- av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%d, %d components)\n", s->bpp, count);
+ if(count > 4U){
+ av_log(s->avctx, AV_LOG_ERROR, "This format is not supported (bpp=%d, %d components)\n", value, count);
return -1;
}
+ s->bppcount = count;
if(count == 1) s->bpp = value;
else{
switch(type){
@@ -344,6 +344,13 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start, const uint8_t *
s->bpp = -1;
}
}
+ if (s->bpp > 64U) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "This format is not supported (bpp=%d, %d components)\n",
+ s->bpp, count);
+ s->bpp = 0;
+ return AVERROR_INVALIDDATA;
+ }
break;
case TIFF_SAMPLES_PER_PIXEL:
if (count != 1) {
--
1.7.9.5
@@ -1,36 +0,0 @@
From 3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 3 Oct 2014 17:35:58 +0200
Subject: [PATCH] avcodec/pngdec: Check bits per pixel before setting
monoblack pixel format
(Upstream commit 3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6)
Fixes out of array accesses
Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/pngdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index da91aab..f3603b3 100644
--- a/gst-libs/ext/libav/libavcodec/pngdec.c
+++ b/gst-libs/ext/libav/libavcodec/pngdec.c
@@ -481,7 +481,7 @@ static int decode_frame(AVCodecContext *avctx,
} else if (s->bit_depth == 16 &&
s->color_type == PNG_COLOR_TYPE_RGB) {
avctx->pix_fmt = PIX_FMT_RGB48BE;
- } else if (s->bit_depth == 1 &&
+ } else if (s->bit_depth == 1 && s->bits_per_pixel == 1 &&
s->color_type == PNG_COLOR_TYPE_GRAY) {
avctx->pix_fmt = PIX_FMT_MONOBLACK;
} else if (s->color_type == PNG_COLOR_TYPE_PALETTE) {
--
1.7.9.5
@@ -1,35 +0,0 @@
From e7e5114c506957f40aafd794e06de1a7e341e9d5 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 3 Oct 2014 19:33:01 +0200
Subject: [PATCH] avcodec/cinepak: fix integer underflow
(Upstream commit e7e5114c506957f40aafd794e06de1a7e341e9d5)
Fixes out of array access
Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi
Upstream-status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/cinepak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index 4746289..f651c48 100644
--- a/gst-libs/ext/libav/libavcodec/cinepak.c
+++ b/gst-libs/ext/libav/libavcodec/cinepak.c
@@ -125,7 +125,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
const uint8_t *eod = (data + size);
uint32_t flag, mask;
cvid_codebook *codebook;
- unsigned int x, y;
+ int x, y;
uint32_t iy[4];
uint32_t iu[2];
uint32_t iv[2];
--
1.7.9.5
@@ -1,59 +0,0 @@
From 8f1457864be8fb9653643519dea1c6492f1dde57 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Fri, 3 Oct 2014 20:15:52 +0200
Subject: [PATCH] avcodec/gifdec: factorize interleave end handling out
(Upstream commit 8f1457864be8fb9653643519dea1c6492f1dde57)
also change it to a loop
Fixes out of array access
Fixes: asan_heap-oob_ca5410_8_asan_heap-oob_ca5410_97_ID_LSD_Size_Less_Then_Data_Inter_3.gif
Upstream-Status: Backport
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/gifdec.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index dee48f5..90de38b 100644
--- a/gst-libs/ext/libav/libavcodec/gifdec.c
+++ b/gst-libs/ext/libav/libavcodec/gifdec.c
@@ -271,26 +271,21 @@ static int gif_read_image(GifState *s, AVFrame *frame)
case 1:
y1 += 8;
ptr += linesize * 8;
- if (y1 >= height) {
- y1 = pass ? 2 : 4;
- ptr = ptr1 + linesize * y1;
- pass++;
- }
break;
case 2:
y1 += 4;
ptr += linesize * 4;
- if (y1 >= height) {
- y1 = 1;
- ptr = ptr1 + linesize;
- pass++;
- }
break;
case 3:
y1 += 2;
ptr += linesize * 2;
break;
}
+ while (y1 >= height) {
+ y1 = 4 >> pass;
+ ptr = ptr1 + linesize * y1;
+ pass++;
+ }
} else {
ptr += linesize;
}
--
1.7.9.5
@@ -1,37 +0,0 @@
From 0d3a3b9f8907625b361420d48fe05716859620ff Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Wed, 26 Nov 2014 18:56:39 +0100
Subject: [PATCH] avcodec/rawdec: Check the return code of
avpicture_get_size()
(Upstream commit 1d3a3b9f8907625b361420d48fe05716859620ff)
Fixes out of array access
Fixes: asan_heap-oob_22388d0_3435_cov_3297128910_small_roll5_FlashCine1.cine
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Upstream-Status: Backport
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Yue Tao <yue.tao@windriver.com>
---
libavcodec/rawdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 28792a1..647dfa9 100644
--- a/gst-libs/ext/libav/libavcodec/rawdec.c
+++ b/gst-libs/ext/libav/libavcodec/rawdec.c
@@ -87,6 +87,9 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
ff_set_systematic_pal2(context->palette, avctx->pix_fmt);
context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
+ if (context->length < 0)
+ return context->length;
+
if((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
avctx->pix_fmt==PIX_FMT_PAL8 &&
(!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){
--
1.7.9.5
@@ -1,41 +0,0 @@
From dc68faf8339a885bc55fabe5b01f1de4f8f3782c Mon Sep 17 00:00:00 2001
From: Kai Kang <kai.kang@windriver.com>
Date: Wed, 13 May 2015 16:30:53 +0800
Subject: [PATCH 1/2] gst-ffmpeg: fix CVE-2014-9603
Upstream-Status: Backport
Upstream is version 2.x and vmdav.c is splitted into 2 files vmdaudio.c
and vmdvideo.c. Becuase source code changes, just partly backport commit which
is applicable to version 0.10.13 to fix CVE-2014-9603.
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=3030fb7e0d41836f8add6399e9a7c7b740b48bfd
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
gst-libs/ext/libav/libavcodec/vmdav.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gst-libs/ext/libav/libavcodec/vmdav.c b/gst-libs/ext/libav/libavcodec/vmdav.c
index d258252..ba88ad8 100644
--- a/gst-libs/ext/libav/libavcodec/vmdav.c
+++ b/gst-libs/ext/libav/libavcodec/vmdav.c
@@ -294,10 +294,13 @@ static void vmd_decode(VmdVideoContext *s)
len = *pb++;
if (len & 0x80) {
len = (len & 0x7F) + 1;
- if (*pb++ == 0xFF)
+ if (*pb++ == 0xFF) {
len = rle_unpack(pb, &dp[ofs], len, frame_width - ofs);
- else
+ } else {
+ if (ofs + len > frame_width)
+ return;
memcpy(&dp[ofs], pb, len);
+ }
pb += len;
ofs += len;
} else {
--
1.9.1
@@ -1,57 +0,0 @@
Backport http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=5f654897e325349dacf2546674e0510bb72ecb50;hp=250cebeb3b348c3da71f9972eb500d6005dc01f1
Fixes these errors on x86
libavcodec/x86/h264_qpel_mmx.c: Assembler messages:
libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
make[5]: *** [libavcodec/x86/dsputil_mmx.o] Error 1
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Backport
Index: gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c
===================================================================
--- gst-ffmpeg-0.10.13.orig/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c 2012-03-30 11:39:41.324522051 -0700
+++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c 2012-03-30 11:54:08.152564075 -0700
@@ -398,7 +398,7 @@
"2: \n\t"\
\
: "+a"(src), "+c"(dst)\
- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
+ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
: "memory"\
);\
src += 4-(h+5)*srcStride;\
@@ -446,7 +446,7 @@
QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
"2: \n\t"\
: "+a"(src)\
- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\
+ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\
: "memory"\
);\
tmp += 4;\
@@ -823,7 +823,7 @@
"2: \n\t"\
\
: "+a"(src), "+c"(dst)\
- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
+ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
: XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \
"%xmm4", "%xmm5", "%xmm6", "%xmm7",)\
"memory"\
@@ -878,7 +878,7 @@
QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
"2: \n\t"
: "+a"(src)
- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)
+ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)
: XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3",
"%xmm4", "%xmm5", "%xmm6", "%xmm7",)
"memory"
@@ -1,21 +0,0 @@
diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure
index 8473069..4f74952 100755
--- a/gst-libs/ext/libav/configure
+++ b/gst-libs/ext/libav/configure
Fix gst-ffmpeg build issues for libav on e500mc (fsl-p4080)
Upstream-Status: Backport
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
@@ -2210,6 +2210,10 @@ elif enabled ppc; then
cpuflags="-mcpu=cell"
enable ldbrx
;;
+ e500mc)
+ cpuflags="-mcpu=e500mc"
+ disable altivec
+ ;;
e500v2)
cpuflags="-mcpu=8548 -mhard-float -mfloat-gprs=double"
disable altivec
@@ -1,19 +0,0 @@
libav: Add configs for ppc e5500
Upstream-Status: Pending
Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
--- gst-ffmpeg-0.10.13/gst-libs/ext/libav/configure 2013-06-20 05:18:36.073104964 -0400
+++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/configure 2013-06-20 05:18:38.269104150 -0400
@@ -2222,6 +2222,10 @@
cpuflags="-mcpu=8540 -mhard-float"
disable altivec
;;
+ e5500)
+ cpuflags="-mcpu=e5500 -mhard-float"
+ disable altivec
+ ;;
esac
elif enabled x86; then
@@ -1,103 +0,0 @@
SUMMARY = "FFmpeg-based GStreamer plug-in"
SECTION = "multimedia"
LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://ext/libpostproc/gstpostproc.c;beginline=1;endline=18;md5=5896e445e41681324381f5869ee33d38 \
file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605 \
file://ext/ffmpeg/gstffmpeg.h;beginline=1;endline=18;md5=ff65467b0c53cdfa98d0684c1bc240a9 \
file://gst-libs/ext/libav/LICENSE;md5=abc3b8cb02856aa7823bbbd162d16232 \
file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
LICENSE_FLAGS = "commercial"
HOMEPAGE = "http://www.gstreamer.net/"
DEPENDS = "gstreamer gst-plugins-base zlib bzip2 yasm-native libpostproc"
inherit autotools-brokensep pkgconfig
SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
file://lower-rank.diff \
file://configure-fix.patch \
file://h264_qpel_mmx.patch \
file://libav_e500mc.patch \
file://libav_e5500.patch \
file://gst-ffmpeg-CVE-2013-3674.patch \
file://0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch \
file://0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch \
file://0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch \
file://0001-huffyuvdec-Skip-len-0-cases.patch \
file://0001-huffyuvdec-Check-init_vlc-return-codes.patch \
file://0001-alsdec-check-block-length.patch \
file://0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch \
file://0001-atrac3dec-Check-coding-mode-against-channels.patch \
file://0001-eamad-fix-out-of-array-accesses.patch \
file://0001-mjpegdec-check-SE.patch \
file://0001-alac-fix-nb_samples-order-case.patch \
file://0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch \
file://0001-roqvideodec-check-dimensions-validity.patch \
file://0001-aacdec-check-channel-count.patch \
file://0001-pngdec-filter-dont-access-out-of-array-elements-at-t.patch \
file://0001-error_concealment-Check-that-the-picture-is-not-in-a.patch \
file://0001-vp3-fix-oob-read-for-negative-tokens-and-memleaks-on.patch \
file://0001-vp3-Copy-all-3-frames-for-thread-updates.patch \
file://0001-h264_sei-Fix-infinite-loop.patch \
file://0001-avcodec-parser-reset-indexes-on-realloc-failure.patch \
file://0001-avcodec-rpza-Perform-pointer-advance-and-checks-befo.patch \
file://gst-ffmpeg-CVE-2013-0855.patch \
file://0001-qdm2dec-fix-buffer-overflow.patch \
file://0001-smackerdec-Check-that-the-last-indexes-are-within-th.patch \
file://0001-avcodec-dsputil-fix-signedness-in-sizeof-comparissio.patch \
file://0001-error-concealment-initialize-block-index.patch \
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 \
file://libav-9.patch \
file://gst-ffmpeg-fix-CVE-2011-4352.patch \
file://gst-ffmpeg-fix-CVE-2014-7933.patch \
file://gst-ffmpeg-fix-CVE-2014-8542.patch \
file://gst-ffmpeg-fix-CVE-2014-8543.patch \
file://gst-ffmpeg-fix-CVE-2014-8544.patch \
file://gst-ffmpeg-fix-CVE-2014-8545.patch \
file://gst-ffmpeg-fix-CVE-2014-8546.patch \
file://gst-ffmpeg-fix-CVE-2014-8547.patch \
file://gst-ffmpeg-fix-CVE-2014-9318.patch \
file://gst-ffmpeg-fix-CVE-2014-9603.patch \
"
SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
SRC_URI[sha256sum] = "76fca05b08e00134e3cb92fa347507f42cbd48ddb08ed3343a912def187fbb62"
PR = "r8"
GSTREAMER_DEBUG ?= "--disable-debug"
FFMPEG_EXTRA_CONFIGURE = "--with-ffmpeg-extra-configure"
# pass --cpu for powerpc. get cpu name by stripping "ppc" or "ppc64"
# from DEFAULTTUNE
FFMPEG_CPU_powerpc = "--cpu=${@d.getVar('DEFAULTTUNE', False)[3:]}"
FFMPEG_CPU_powerpc64 = "--cpu=${@d.getVar('DEFAULTTUNE', False)[5:]}"
FFMPEG_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux ${FFMPEG_CPU} \
--cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
--ranlib='${RANLIB}' \
${GSTREAMER_DEBUG}"
FFMPEG_EXTRA_CONFIGURE_COMMON = \
'${FFMPEG_EXTRA_CONFIGURE}="${FFMPEG_EXTRA_CONFIGURE_COMMON_ARG}"'
EXTRA_OECONF = "${FFMPEG_EXTRA_CONFIGURE_COMMON}"
PACKAGECONFIG ??= "external-libav"
PACKAGECONFIG[external-libav] = "--with-system-ffmpeg,,libav"
PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la"
FILES_${PN}-staticdev += "${libdir}/gstreamer-0.10/*.a"
# http://errors.yoctoproject.org/Errors/Details/40736/
PNBLACKLIST[gst-ffmpeg] ?= "Not compatible with currently used ffmpeg 3 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
@@ -1,60 +0,0 @@
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 3e46d2e501da68d929bb5f26900a292a5fc04a1f Mon Sep 17 00:00:00 2001
From: Stefan Westerfeld <stefan@space.twc.de>
Date: Mon, 23 Apr 2012 03:10:22 +0200
Subject: [PATCH] Fix time display updates (broken by introduction of quiet
mode).
---
src/gst123.cc | 1 +
src/msg.cc | 7 +++++++
src/msg.h | 1 +
3 files changed, 9 insertions(+)
diff --git a/src/gst123.cc b/src/gst123.cc
index 20e91e5..ce5876d 100644
--- a/src/gst123.cc
+++ b/src/gst123.cc
@@ -640,6 +640,7 @@ cb_print_position (gpointer *data)
else
blanks += " ";
Msg::print ("%s%s\r", status.c_str(), blanks.c_str());
+ Msg::flush();
}
/* call me again */
diff --git a/src/msg.cc b/src/msg.cc
index 547cd90..33cada2 100644
--- a/src/msg.cc
+++ b/src/msg.cc
@@ -41,6 +41,13 @@ print (const char *format, ...)
}
}
+void
+flush()
+{
+ if (!Options::the().quiet)
+ fflush (stdout);
+}
+
}
}
diff --git a/src/msg.h b/src/msg.h
index e0ced24..5bebac0 100644
--- a/src/msg.h
+++ b/src/msg.h
@@ -27,6 +27,7 @@ namespace Msg
{
void print (const char *format, ...);
+void flush();
}
--
1.7.9.5
@@ -1,17 +0,0 @@
SUMMARY = "Flexible CLI player in the spirit of mpg123, based on GStreamer"
HOMEPAGE = "http://space.twc.de/~stefan/gst123.php"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
file://src/gst123.cc;beginline=1;endline=19;md5=05d2f5d54b985b986c26af931d2084f8"
DEPENDS = "libx11 gstreamer gst-plugins-base gtk+ ncurses"
SRC_URI = "http://space.twc.de/~stefan/gst123/${BPN}-${PV}.tar.bz2 \
file://display.patch"
SRC_URI[md5sum] = "1e77767c9d6fecee5641f95804f160fe"
SRC_URI[sha256sum] = "89d1de025eca0466c125dcd6a11b64341bdf98ee4c03c3e5a12321d77cb8b0ce"
inherit autotools
PNBLACKLIST[gst123] ?= "gst123 is still "sometimes" using wrong sysroot - the recipe will be removed on 2017-09-01 unless the issue is fixed"