aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-01-02 15:19:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-01-02 16:06:45 +0000
commit06f65ba37625beda04d656166d12a9293d6e710a (patch)
tree8d5b9dbac93f941270ff1f546fd69b23f2aa196f
parent2cd9f0f5d3212025f20b8ed0000eeb547d1a8cb5 (diff)
downloadaports-06f65ba37625beda04d656166d12a9293d6e710a.tar.gz
aports-06f65ba37625beda04d656166d12a9293d6e710a.tar.bz2
aports-06f65ba37625beda04d656166d12a9293d6e710a.tar.xz
community/kodi: fix build
-rw-r--r--community/kodi/APKBUILD26
-rw-r--r--community/kodi/ffmpeg-4.0.1.patch345
-rw-r--r--community/kodi/vaapi.patch15
3 files changed, 373 insertions, 13 deletions
diff --git a/community/kodi/APKBUILD b/community/kodi/APKBUILD
index 38f108f7a4..d61c5f2f01 100644
--- a/community/kodi/APKBUILD
+++ b/community/kodi/APKBUILD
@@ -3,7 +3,7 @@
pkgname=kodi
pkgver=17.6
_realname=Krypton
-pkgrel=8
+pkgrel=9
pkgdesc="A software media player and entertainment hub for digital media"
url="http://kodi.tv"
arch="x86 x86_64"
@@ -24,7 +24,7 @@ depends_dev="gettext-dev boost-dev mesa-dev glew-dev glu-dev mariadb-connector-c
libdvdcss-dev"
makedepends="$depends_dev automake autoconf m4 libtool swig findutils
openjdk8-jre-base boost-thread zip gperf cmake coreutils nasm tar
- git"
+ git bash"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg"
install=""
replaces="xbmc"
@@ -37,6 +37,8 @@ source="https://github.com/xbmc/xbmc/archive/$pkgver-$_realname.tar.gz
add-missing-includes.patch
set-default-stacksize.patch
19-fix-audio-with-latest-ffmpeg.patch
+ ffmpeg-4.0.1.patch
+ vaapi.patch
"
builddir="$srcdir/xbmc-$pkgver-$_realname"
@@ -44,12 +46,8 @@ builddir="$srcdir/xbmc-$pkgver-$_realname"
prepare() {
local i
cd "$builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- MAKEFLAGS="-j1" ./bootstrap || return 1
+ default_prepare
+ MAKEFLAGS="-j1" ./bootstrap
mkdir -p crossguid
make -j1 -C tools/depends/target/crossguid PREFIX="$PWD"/crossguid
}
@@ -58,6 +56,7 @@ build() {
cd "$builddir"
LDFLAGS="$LDFLAGS -L$PWD/crossguid/lib" \
CXXFLAGS="$CXXFLAGS -I$PWD/crossguid/include" \
+ CONFIG_SHELL=/bin/bash \
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -71,14 +70,13 @@ build() {
--with-ffmpeg=shared \
--enable-static=no \
--enable-libbluray \
- --enable-external-libraries \
- || return 1
- make || return 1
+ --enable-external-libraries
+ make
}
package() {
cd "$builddir"
- make DESTDIR="$pkgdir" install || return 1
+ make DESTDIR="$pkgdir" install
}
sha512sums="1f1ba91e6129ab423f9ad47b63d7bb75775dbf18638a96413a572aaa790f4f0d738ca35486513e158a7f55d501f78f08dd9d68aabe2fbb80a729c6091b264111 17.6-Krypton.tar.gz
@@ -88,4 +86,6 @@ f225073ca75647581463094c0a9d1dd1fa3e1a58353292e1c99da30eb6f97026f4647853da2bbdc7
118a4e10ac5abdd9b6cfc87ad1b91cf03b3641023337571250beb5125c2c830e678eced1e42703253d66af61ec9fe3ce6c44cf7c0012d457f9bebc0ddfe992d2 remove-filewrap.patch
378a0e8fd9676dd76cfb30d62085b953625dd0185e2673de2331fc7ae0802dae4f56d0b74e878e4d313942fda8831e9669bff284dbe974db5ad16fe07af884d6 add-missing-includes.patch
3fd97e9fa22e59b3cd30fdad19474e177a9d062598765fa8ba4955f1da4e10581ff1463dd0794d3ee3cefebf753007a4d445b2bc47a257574d3927c1408b8876 set-default-stacksize.patch
-3c35ef05b79cf0af9bacc74bb79dd1178efb1cb6de0354b7a35c732c2006cc7071748a062f3b274591dcb30179d4cc0af527a223dcad2919426bac663f038dbb 19-fix-audio-with-latest-ffmpeg.patch"
+3c35ef05b79cf0af9bacc74bb79dd1178efb1cb6de0354b7a35c732c2006cc7071748a062f3b274591dcb30179d4cc0af527a223dcad2919426bac663f038dbb 19-fix-audio-with-latest-ffmpeg.patch
+e6f0065cd4e505ae861f3df810d62bbd2255c38d3fd7d622cfb742dba26bad1a992a1c1812aaf540e17ce23d95bcb9c3895b6e78e0a2cfceebbd3a60b3a5cc24 ffmpeg-4.0.1.patch
+d30e0c1c7e68ce67a35e4d552517058a1da96a7bd0b441ec9084f4e8d695d3c368b3230660a069a74fa2cb7c2d32bbfdcce51517c7d88fc9b043068e953b5cc9 vaapi.patch"
diff --git a/community/kodi/ffmpeg-4.0.1.patch b/community/kodi/ffmpeg-4.0.1.patch
new file mode 100644
index 0000000000..ba1a5320e2
--- /dev/null
+++ b/community/kodi/ffmpeg-4.0.1.patch
@@ -0,0 +1,345 @@
+--- xbmc-17.6-Krypton/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h 2018-07-02 20:54:54.388785087 +0200
+@@ -56,7 +56,7 @@
+ SwrContext *m_SwrCtx;
+ CAEChannelInfo m_Layout;
+ AVPacket m_Pkt;
+- uint8_t m_Buffer[8 + FF_MIN_BUFFER_SIZE];
++ uint8_t m_Buffer[8 + AV_INPUT_BUFFER_MIN_SIZE];
+ int m_BufferSize;
+ int m_OutputSize;
+ double m_OutputRatio;
+--- xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp 2018-07-02 21:13:08.856841550 +0200
+@@ -82,8 +82,8 @@
+ m_pCodecContext->debug = 0;
+ m_pCodecContext->workaround_bugs = 1;
+
+- if (pCodec->capabilities & CODEC_CAP_TRUNCATED)
+- m_pCodecContext->flags |= CODEC_FLAG_TRUNCATED;
++ if (pCodec->capabilities & AV_CODEC_CAP_TRUNCATED)
++ m_pCodecContext->flags |= AV_CODEC_FLAG_TRUNCATED;
+
+ m_matrixEncoding = AV_MATRIX_ENCODING_NONE;
+ m_channels = 0;
+@@ -98,7 +98,7 @@
+
+ if( hints.extradata && hints.extrasize > 0 )
+ {
+- m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + FF_INPUT_BUFFER_PADDING_SIZE);
++ m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + AV_INPUT_BUFFER_PADDING_SIZE);
+ if(m_pCodecContext->extradata)
+ {
+ m_pCodecContext->extradata_size = hints.extrasize;
+--- xbmc-17.6-Krypton/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEFilter.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEFilter.cpp 2018-07-02 21:06:40.206821500 +0200
+@@ -91,7 +91,13 @@
+ return false;
+ }
+
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
++ const
++#endif
+ AVFilter* srcFilter = avfilter_get_by_name("abuffer");
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
++ const
++#endif
+ AVFilter* outFilter = avfilter_get_by_name("abuffersink");
+
+ std::string args = StringUtils::Format("time_base=1/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%" PRIx64,
+@@ -121,6 +127,9 @@
+
+ bool CActiveAEFilter::CreateAtempoFilter()
+ {
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
++ const
++#endif
+ AVFilter *atempo;
+
+ atempo = avfilter_get_by_name("atempo");
+--- xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2018-07-02 21:22:36.309870824 +0200
+@@ -73,7 +73,7 @@
+ if( hints.extradata && hints.extrasize > 0 )
+ {
+ m_pCodecContext->extradata_size = hints.extrasize;
+- m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + FF_INPUT_BUFFER_PADDING_SIZE);
++ m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + AV_INPUT_BUFFER_PADDING_SIZE);
+ memcpy(m_pCodecContext->extradata, hints.extradata, hints.extrasize);
+
+ // start parsing of extra data - create a copy to be safe and make it zero-terminating to avoid access violations!
+--- xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxUtils.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxUtils.cpp 2018-07-02 21:23:35.419873874 +0200
+@@ -68,7 +68,7 @@
+ * Note, if the first 23 bits of the additional bytes are not 0 then damaged
+ * MPEG bitstreams could cause overread and segfault
+ */
+- pPacket->pData =(uint8_t*)_aligned_malloc(iDataSize + FF_INPUT_BUFFER_PADDING_SIZE, 16);
++ pPacket->pData =(uint8_t*)_aligned_malloc(iDataSize + AV_INPUT_BUFFER_PADDING_SIZE, 16);
+ if (!pPacket->pData)
+ {
+ FreeDemuxPacket(pPacket);
+@@ -76,7 +76,7 @@
+ }
+
+ // reset the last 8 bytes to 0;
+- memset(pPacket->pData + iDataSize, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(pPacket->pData + iDataSize, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ }
+
+ // setup defaults
+--- xbmc-17.6-Krypton/xbmc/utils/BitstreamConverter.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/utils/BitstreamConverter.cpp 2018-07-02 21:26:49.852883905 +0200
+@@ -686,13 +686,13 @@
+ unit_size = extradata[0] << 8 | extradata[1];
+ total_size += unit_size + 4;
+
+- if (total_size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE ||
++ if (total_size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE ||
+ (extradata + 2 + unit_size) > ((uint8_t*)in_extradata + in_extrasize))
+ {
+ av_free(out);
+ return false;
+ }
+- tmp = av_realloc(out, total_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ tmp = av_realloc(out, total_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!tmp)
+ {
+ av_free(out);
+@@ -713,7 +713,7 @@
+ }
+
+ if (out)
+- memset(out + total_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(out + total_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+
+ if (!sps_seen)
+ CLog::Log(LOGDEBUG, "SPS NALU missing or invalid. The resulting stream may not play");
+@@ -776,13 +776,13 @@
+ }
+ total_size += unit_size + 4;
+
+- if (total_size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE ||
++ if (total_size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE ||
+ (extradata + unit_size) > ((uint8_t*)in_extradata + in_extrasize))
+ {
+ av_free(out);
+ return false;
+ }
+- tmp = av_realloc(out, total_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ tmp = av_realloc(out, total_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!tmp)
+ {
+ av_free(out);
+@@ -796,7 +796,7 @@
+ }
+
+ if (out)
+- memset(out + total_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(out + total_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+
+ if (!sps_seen)
+ CLog::Log(LOGDEBUG, "SPS NALU missing or invalid. The resulting stream may not play");
+--- xbmc-17.6-Krypton/xbmc/guilib/FFmpegImage.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/guilib/FFmpegImage.cpp 2018-07-02 21:29:40.403892703 +0200
+@@ -551,7 +551,7 @@
+ tdm.avOutctx->time_base.num = 1;
+ tdm.avOutctx->time_base.den = 1;
+ tdm.avOutctx->pix_fmt = jpg_output ? AV_PIX_FMT_YUVJ420P : AV_PIX_FMT_RGBA;
+- tdm.avOutctx->flags = CODEC_FLAG_QSCALE;
++ tdm.avOutctx->flags = AV_CODEC_FLAG_QSCALE;
+ tdm.avOutctx->mb_lmin = tdm.avOutctx->qmin * FF_QP2LAMBDA;
+ tdm.avOutctx->mb_lmax = tdm.avOutctx->qmax * FF_QP2LAMBDA;
+ tdm.avOutctx->global_quality = tdm.avOutctx->qmin * FF_QP2LAMBDA;
+--- xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp 2018-07-02 21:32:30.151901460 +0200
+@@ -25,7 +25,7 @@
+ #include "settings/Settings.h"
+ #include "../DVDClock.h"
+
+-#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - FF_INPUT_BUFFER_PADDING_SIZE)
++#define AV_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE)
+
+
+ class CDemuxStreamClientInternal
+@@ -172,16 +172,16 @@
+ if (stream->m_parser_split && stream->m_parser->parser->split)
+ {
+ int len = stream->m_parser->parser->split(stream->m_context, pkt->pData, pkt->iSize);
+- if (len > 0 && len < FF_MAX_EXTRADATA_SIZE)
++ if (len > 0 && len < AV_MAX_EXTRADATA_SIZE)
+ {
+ if (st->ExtraData)
+ delete[] (uint8_t*)st->ExtraData;
+ st->changes++;
+ st->disabled = false;
+ st->ExtraSize = len;
+- st->ExtraData = new uint8_t[len+FF_INPUT_BUFFER_PADDING_SIZE];
++ st->ExtraData = new uint8_t[len+AV_INPUT_BUFFER_PADDING_SIZE];
+ memcpy(st->ExtraData, pkt->pData, len);
+- memset((uint8_t*)st->ExtraData + len, 0 , FF_INPUT_BUFFER_PADDING_SIZE);
++ memset((uint8_t*)st->ExtraData + len, 0 , AV_INPUT_BUFFER_PADDING_SIZE);
+ stream->m_parser_split = false;
+ }
+ }
+--- xbmc-17.6-Krypton/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp 2017-11-14 17:55:01.000000000 +0100
++++ xbmc-17.6-Krypton/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp 2018-07-02 21:39:23.350922777 +0200
+@@ -86,8 +86,8 @@
+ m_pCodecContext->debug = 0;
+ m_pCodecContext->workaround_bugs = 1;
+
+- if (pCodec->capabilities & CODEC_CAP_TRUNCATED)
+- m_pCodecContext->flags |= CODEC_FLAG_TRUNCATED;
++ if (pCodec->capabilities & AV_CODEC_CAP_TRUNCATED)
++ m_pCodecContext->flags |= AV_CODEC_FLAG_TRUNCATED;
+
+ m_channels = 0;
+ m_pCodecContext->channels = hints.channels;
+@@ -110,7 +110,7 @@
+
+ if( hints.extradata && hints.extrasize > 0 )
+ {
+- m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + FF_INPUT_BUFFER_PADDING_SIZE);
++ m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + AV_INPUT_BUFFER_PADDING_SIZE);
+ if(m_pCodecContext->extradata)
+ {
+ m_pCodecContext->extradata_size = hints.extrasize;
+@@ -222,7 +222,7 @@
+
+ if (m_iBufferOutputAlloced < m_iBufferOutputUsed + outputSize)
+ {
+- m_pBufferOutput = (BYTE*)av_realloc(m_pBufferOutput, m_iBufferOutputUsed + outputSize + FF_INPUT_BUFFER_PADDING_SIZE);
++ m_pBufferOutput = (BYTE*)av_realloc(m_pBufferOutput, m_iBufferOutputUsed + outputSize + AV_INPUT_BUFFER_PADDING_SIZE);
+ m_iBufferOutputAlloced = m_iBufferOutputUsed + outputSize;
+ }
+
+
+--- xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp.orig 2018-07-03 03:58:00.987120857 +0200
++++ xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2018-07-03 04:00:22.013863754 +0200
+@@ -382,16 +382,6 @@
+ else
+ m_decoderState = STATE_SW_SINGLE;
+
+-#if defined(TARGET_DARWIN_IOS)
+- // ffmpeg with enabled neon will crash and burn if this is enabled
+- m_pCodecContext->flags &= CODEC_FLAG_EMU_EDGE;
+-#else
+- if (pCodec->id != AV_CODEC_ID_H264 && pCodec->capabilities & CODEC_CAP_DR1
+- && pCodec->id != AV_CODEC_ID_VP8
+- )
+- m_pCodecContext->flags |= CODEC_FLAG_EMU_EDGE;
+-#endif
+-
+ // if we don't do this, then some codecs seem to fail.
+ m_pCodecContext->coded_height = hints.height;
+ m_pCodecContext->coded_width = hints.width;
+@@ -882,23 +872,7 @@
+ else
+ pDvdVideoPicture->color_range = 0;
+
+- int qscale_type;
+- pDvdVideoPicture->qp_table = av_frame_get_qp_table(m_pFrame, &pDvdVideoPicture->qstride, &qscale_type);
+-
+- switch (qscale_type)
+- {
+- case FF_QSCALE_TYPE_MPEG1:
+- pDvdVideoPicture->qscale_type = DVP_QSCALE_MPEG1;
+- break;
+- case FF_QSCALE_TYPE_MPEG2:
+- pDvdVideoPicture->qscale_type = DVP_QSCALE_MPEG2;
+- break;
+- case FF_QSCALE_TYPE_H264:
+- pDvdVideoPicture->qscale_type = DVP_QSCALE_H264;
+- break;
+- default:
+- pDvdVideoPicture->qscale_type = DVP_QSCALE_UNKNOWN;
+- }
++ pDvdVideoPicture->qp_table = av_frame_get_qp_table(m_pFrame, &pDvdVideoPicture->qstride, &pDvdVideoPicture->qscale_type);
+
+ if (pDvdVideoPicture->iRepeatPicture)
+ pDvdVideoPicture->dts = DVD_NOPTS_VALUE;
+@@ -989,7 +963,13 @@
+ return -1;
+ }
+
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
++ const
++#endif
+ AVFilter* srcFilter = avfilter_get_by_name("buffer");
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
++ const
++#endif
+ AVFilter* outFilter = avfilter_get_by_name("buffersink"); // should be last filter in the graph for now
+
+ std::string args = StringUtils::Format("%d:%d:%d:%d:%d:%d:%d",
+
+--- xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp.orig 2018-07-03 04:09:57.457702946 +0200
++++ xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2018-07-03 04:10:31.769395588 +0200
+@@ -390,7 +390,7 @@
+ if( hints.extradata && hints.extrasize > 0 )
+ {
+ m_pCodecContext->extradata_size = hints.extrasize;
+- m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + FF_INPUT_BUFFER_PADDING_SIZE);
++ m_pCodecContext->extradata = (uint8_t*)av_mallocz(hints.extrasize + AV_INPUT_BUFFER_PADDING_SIZE);
+ memcpy(m_pCodecContext->extradata, hints.extradata, hints.extrasize);
+ }
+
+--- xbmc-17.6-Krypton/xbmc/cdrip/EncoderFFmpeg.cpp.orig 2018-07-03 04:15:20.761822331 +0200
++++ xbmc-17.6-Krypton/xbmc/cdrip/EncoderFFmpeg.cpp 2018-07-03 04:16:14.960339734 +0200
+@@ -119,8 +119,8 @@
+
+ if(m_Format->oformat->flags & AVFMT_GLOBALHEADER)
+ {
+- m_CodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
+- m_Format->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ m_CodecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
++ m_Format->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+
+ switch(m_iInBitsPerSample)
+
+--- xbmc-17.6-Krypton/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp.orig 2018-07-03 04:22:26.222041472 +0200
++++ xbmc-17.6-Krypton/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp 2018-07-03 04:22:44.318880987 +0200
+@@ -2955,7 +2955,7 @@
+ int fileSize = sound->GetFileSize();
+
+ fmt_ctx = avformat_alloc_context();
+- unsigned char* buffer = (unsigned char*)av_malloc(SOUNDBUFFER_SIZE+FF_INPUT_BUFFER_PADDING_SIZE);
++ unsigned char* buffer = (unsigned char*)av_malloc(SOUNDBUFFER_SIZE+AV_INPUT_BUFFER_PADDING_SIZE);
+ io_ctx = avio_alloc_context(buffer, SOUNDBUFFER_SIZE, 0,
+ sound, CActiveAESound::Read, NULL, CActiveAESound::Seek);
+ io_ctx->max_packet_size = sound->GetChunkSize();
+
+--- xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp.orig 2018-07-03 04:29:28.402298801 +0200
++++ xbmc-17.6-Krypton/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2018-07-03 04:30:42.334643983 +0200
+@@ -78,7 +78,7 @@
+ {}
+ };
+
+-#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - FF_INPUT_BUFFER_PADDING_SIZE)
++#define AV_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE)
+
+ std::string CDemuxStreamAudioFFmpeg::GetStreamName()
+ {
+@@ -1876,17 +1876,17 @@
+ if(st->parser && st->parser->parser->split && !st->codec->extradata)
+ {
+ int i = st->parser->parser->split(st->codec, pkt->data, pkt->size);
+- if (i > 0 && i < FF_MAX_EXTRADATA_SIZE)
++ if (i > 0 && i < AV_MAX_EXTRADATA_SIZE)
+ {
+ // Found extradata, fill it in. This will cause
+ // a new stream to be created and used.
+ st->codec->extradata_size = i;
+- st->codec->extradata = (uint8_t*)av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ st->codec->extradata = (uint8_t*)av_malloc(st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (st->codec->extradata)
+ {
+ CLog::Log(LOGDEBUG, "CDVDDemuxFFmpeg::Read() fetching extradata, extradata_size(%d)", st->codec->extradata_size);
+ memcpy(st->codec->extradata, pkt->data, st->codec->extradata_size);
+- memset(st->codec->extradata + i, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(st->codec->extradata + i, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ }
+ else
+ {
+
diff --git a/community/kodi/vaapi.patch b/community/kodi/vaapi.patch
new file mode 100644
index 0000000000..fb279216be
--- /dev/null
+++ b/community/kodi/vaapi.patch
@@ -0,0 +1,15 @@
+diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+index 2f65025..b69cb61 100644
+--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
++++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
+@@ -3090,8 +3090,8 @@ bool CFFmpegPostproc::Init(EINTERLACEMETHOD method)
+ return false;
+ }
+
+- AVFilter* srcFilter = avfilter_get_by_name("buffer");
+- AVFilter* outFilter = avfilter_get_by_name("buffersink");
++ const AVFilter* srcFilter = avfilter_get_by_name("buffer");
++ const AVFilter* outFilter = avfilter_get_by_name("buffersink");
+
+ std::string args = StringUtils::Format("%d:%d:%d:%d:%d:%d:%d",
+ m_config.vidWidth,