summaryrefslogtreecommitdiff
path: root/media-tv/kodi/files
diff options
context:
space:
mode:
Diffstat (limited to 'media-tv/kodi/files')
-rwxr-xr-xmedia-tv/kodi/files/generate.sh34
-rw-r--r--media-tv/kodi/files/kodi-17-adapt-to-deprecated-symbols-and-functions.patch401
-rw-r--r--media-tv/kodi/files/kodi-17-fix-audio-with-latest-ffmpeg.patch15
-rw-r--r--media-tv/kodi/files/kodi-17.3-ftpparse_string.patch82
-rw-r--r--media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch45
-rw-r--r--media-tv/kodi/files/kodi-17.6-nmblookup.patch25
-rw-r--r--media-tv/kodi/files/kodi-17.6-wrapper.patch39
-rw-r--r--media-tv/kodi/files/kodi-cmake-no-java.patch56
8 files changed, 0 insertions, 697 deletions
diff --git a/media-tv/kodi/files/generate.sh b/media-tv/kodi/files/generate.sh
deleted file mode 100755
index 2e5b67fb90e1..000000000000
--- a/media-tv/kodi/files/generate.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-# Generate the various interface files that normally requires java.
-# This makes building the release versions much nicer.
-
-set -eux
-
-PV=$1
-PN=kodi
-P="${PN}-${PV}"
-DISTDIR="/usr/portage/distfiles"
-GITDIR="/usr/local/src/kodi/git"
-
-if [[ ${PV} != "9999" ]] ; then
- rm -rf xbmc-*/
- tar xf ${DISTDIR}/${P}.tar.gz
- d=$(echo xbmc-*/)
-else
- stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d)
- P+="-${stamp}"
- cd ${GITDIR}
- d=.
-fi
-#cd ${d} && git init . && git add . && git commit -qmm && cd ..
-make -C ${d} -j -f codegenerator.mk
-tar="${DISTDIR}/${P}-generated-addons.tar.xz"
-tar cf - \
- ${d}/xbmc/interfaces/python/generated/*.cpp \
- ${d}/xbmc/interfaces/json-rpc/ServiceDescription.h \
- | xz > "${tar}"
-if [[ ${PV} != "9999" ]] ; then
- rm -rf xbmc-*/
-fi
-
-du -b "${tar}"
diff --git a/media-tv/kodi/files/kodi-17-adapt-to-deprecated-symbols-and-functions.patch b/media-tv/kodi/files/kodi-17-adapt-to-deprecated-symbols-and-functions.patch
deleted file mode 100644
index 0ec08810db5e..000000000000
--- a/media-tv/kodi/files/kodi-17-adapt-to-deprecated-symbols-and-functions.patch
+++ /dev/null
@@ -1,401 +0,0 @@
-From 19f28e88a5dfed82e9844f69210f7c045f18ca8e Mon Sep 17 00:00:00 2001
-From: Rainer Hochecker <fernetmenta@online.de>
-Date: Wed, 1 Nov 2017 16:12:13 +0100
-Subject: [PATCH] ffmpeg: drop deprecated symbols and functions
-
----
- xbmc/cdrip/EncoderFFmpeg.cpp | 4 +-
- .../AudioEngine/Encoders/AEEncoderFFmpeg.h | 2 +-
- .../AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 2 +-
- .../Engines/ActiveAE/ActiveAEFilter.cpp | 6 +--
- .../DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp | 6 +--
- .../Overlay/DVDOverlayCodecFFmpeg.cpp | 2 +-
- .../DVDCodecs/Video/DVDVideoCodec.h | 1 +
- .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 39 +++++--------------
- .../DVDCodecs/Video/DVDVideoPPFFmpeg.cpp | 5 +--
- .../VideoPlayer/DVDCodecs/Video/VAAPI.cpp | 4 +-
- .../DVDDemuxers/DVDDemuxClient.cpp | 6 +--
- .../DVDDemuxers/DVDDemuxFFmpeg.cpp | 6 +--
- .../VideoPlayer/DVDDemuxers/DVDDemuxUtils.cpp | 4 +-
- xbmc/cores/VideoPlayer/VideoPlayerVideo.cpp | 1 -
- xbmc/guilib/FFmpegImage.cpp | 4 +-
- xbmc/utils/BitstreamConverter.cpp | 12 +++---
- 16 files changed, 40 insertions(+), 64 deletions(-)
-
-Index: kodi-17.6+dfsg1/xbmc/cdrip/EncoderFFmpeg.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cdrip/EncoderFFmpeg.cpp
-+++ kodi-17.6+dfsg1/xbmc/cdrip/EncoderFFmpeg.cpp
-@@ -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)
-Index: kodi-17.6+dfsg1/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h
-+++ kodi-17.6+dfsg1/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h
-@@ -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;
-Index: kodi-17.6+dfsg1/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
-@@ -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();
-Index: kodi-17.6+dfsg1/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEFilter.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEFilter.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEFilter.cpp
-@@ -91,8 +91,8 @@
- return false;
- }
-
-- AVFilter* srcFilter = avfilter_get_by_name("abuffer");
-- AVFilter* outFilter = avfilter_get_by_name("abuffersink");
-+ const AVFilter* srcFilter = avfilter_get_by_name("abuffer");
-+ const 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,
- m_sampleRate,
-@@ -121,7 +121,7 @@
-
- bool CActiveAEFilter::CreateAtempoFilter()
- {
-- AVFilter *atempo;
-+ const AVFilter *atempo;
-
- atempo = avfilter_get_by_name("atempo");
- m_pFilterCtxAtempo = avfilter_graph_alloc_filter(m_pFilterGraph, atempo, "atempo");
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
-@@ -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;
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
-@@ -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!
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h
-@@ -118,6 +118,7 @@
- int8_t* qp_table; //< Quantization parameters, primarily used by filters
- int qstride;
- int qscale_type;
-+ int pict_type;
-
- unsigned int iWidth;
- unsigned int iHeight;
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-@@ -171,7 +171,7 @@
- ctx->SetHardware(NULL);
- avctx->get_buffer2 = avcodec_default_get_buffer2;
- avctx->slice_flags = 0;
-- avctx->hwaccel_context = 0;
-+ av_buffer_unref(&avctx->hw_frames_ctx);
- }
-
- const AVPixelFormat * cur = fmt;
-@@ -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;
-@@ -400,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);
- }
-
-@@ -791,6 +781,7 @@
- m_droppedFrames = 0;
- m_iLastKeyframe = m_pCodecContext->has_b_frames;
- avcodec_flush_buffers(m_pCodecContext);
-+ av_frame_unref(m_pFrame);
-
- if (m_pHardware)
- m_pHardware->Reset();
-@@ -883,22 +874,10 @@
- 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);
-+ pDvdVideoPicture->pict_type = m_pFrame->pict_type;
-
- if (pDvdVideoPicture->iRepeatPicture)
- pDvdVideoPicture->dts = DVD_NOPTS_VALUE;
-@@ -989,8 +968,8 @@
- return -1;
- }
-
-- AVFilter* srcFilter = avfilter_get_by_name("buffer");
-- AVFilter* outFilter = avfilter_get_by_name("buffersink"); // should be last filter in the graph for now
-+ const AVFilter* srcFilter = avfilter_get_by_name("buffer");
-+ const 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",
- m_pCodecContext->width,
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoPPFFmpeg.cpp
-@@ -132,15 +132,12 @@
- }
- }
-
-- int pict_type = (m_pSource->qscale_type != DVP_QSCALE_MPEG1) ?
-- PP_PICT_TYPE_QP2 : 0;
--
- pp_postprocess((const uint8_t**)m_pSource->data, m_pSource->iLineSize,
- m_pTarget->data, m_pTarget->iLineSize,
- m_pSource->iWidth, m_pSource->iHeight,
- m_pSource->qp_table, m_pSource->qstride,
- m_pMode, m_pContext,
-- pict_type); //m_pSource->iFrameType);
-+ m_pSource->pict_type | m_pSource->qscale_type ? PP_PICT_TYPE_QP2 : 0);
-
- //Copy frame information over to target, but make sure it is set as allocated should decoder have forgotten
- m_pTarget->iFlags = m_pSource->iFlags | DVP_FLAG_ALLOCATED;
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp
-@@ -3090,8 +3090,8 @@
- 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,
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
-@@ -25,7 +25,7 @@
- #include "settings/Settings.h"
- #include "../DVDClock.h"
-
--#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - FF_INPUT_BUFFER_PADDING_SIZE)
-+#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE)
-
-
- class CDemuxStreamClientInternal
-@@ -179,9 +179,9 @@
- 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;
- }
- }
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
-@@ -78,7 +78,7 @@
- {}
- };
-
--#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - FF_INPUT_BUFFER_PADDING_SIZE)
-+#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE)
-
- std::string CDemuxStreamAudioFFmpeg::GetStreamName()
- {
-@@ -1881,12 +1881,12 @@
- // 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
- {
-Index: kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxUtils.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxUtils.cpp
-+++ kodi-17.6+dfsg1/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxUtils.cpp
-@@ -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
-Index: kodi-17.6+dfsg1/xbmc/guilib/FFmpegImage.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/guilib/FFmpegImage.cpp
-+++ kodi-17.6+dfsg1/xbmc/guilib/FFmpegImage.cpp
-@@ -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;
-Index: kodi-17.6+dfsg1/xbmc/utils/BitstreamConverter.cpp
-===================================================================
---- kodi-17.6+dfsg1.orig/xbmc/utils/BitstreamConverter.cpp
-+++ kodi-17.6+dfsg1/xbmc/utils/BitstreamConverter.cpp
-@@ -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");
diff --git a/media-tv/kodi/files/kodi-17-fix-audio-with-latest-ffmpeg.patch b/media-tv/kodi/files/kodi-17-fix-audio-with-latest-ffmpeg.patch
deleted file mode 100644
index 5f5e613bed2d..000000000000
--- a/media-tv/kodi/files/kodi-17-fix-audio-with-latest-ffmpeg.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-From: Stefan Hachmann <stefan@hachmann-it.de>
-To: 881536@bugs.debian.org
-Subject: Re: Bug#881536: ffmpeg: Breaks sound in kodi
-
---- a/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
-+++ b/xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
-@@ -486,7 +486,7 @@
- // guess next pts
- m_audioClock += audioframe.duration;
-
-- int ret = m_pAudioCodec->Decode(nullptr, 0, DVD_NOPTS_VALUE, DVD_NOPTS_VALUE);
-+ int ret = 0;
- if (ret < 0)
- {
- CLog::Log(LOGERROR, "CVideoPlayerAudio::DecodeFrame - Decode Error. Skipping audio packet (%d)", ret);
diff --git a/media-tv/kodi/files/kodi-17.3-ftpparse_string.patch b/media-tv/kodi/files/kodi-17.3-ftpparse_string.patch
deleted file mode 100644
index da8d57a3d6b2..000000000000
--- a/media-tv/kodi/files/kodi-17.3-ftpparse_string.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 634153c85115b44015cdb1ddd6263f5a87e4e41b Mon Sep 17 00:00:00 2001
-From: Stefan Saraev <stefan@saraev.ca>
-Date: Sun, 7 May 2017 17:30:47 +0300
-Subject: [PATCH] FTPParse.cpp: use std::string
-
----
- xbmc/filesystem/FTPParse.cpp | 44 ++++++++++++++++++++++----------------------
- 1 file changed, 22 insertions(+), 22 deletions(-)
-
-diff --git a/xbmc/filesystem/FTPParse.cpp b/xbmc/filesystem/FTPParse.cpp
-index 8dd9633ae19e..d78349adb580 100644
---- a/xbmc/filesystem/FTPParse.cpp
-+++ b/xbmc/filesystem/FTPParse.cpp
-@@ -30,7 +30,7 @@ CFTPParse::CFTPParse()
- m_time = 0;
- }
-
--string CFTPParse::getName()
-+std::string CFTPParse::getName()
- {
- return m_name;
- }
-@@ -55,16 +55,16 @@ time_t CFTPParse::getTime()
- return m_time;
- }
-
--void CFTPParse::setTime(string str)
-+void CFTPParse::setTime(std::string str)
- {
- /* Variables used to capture patterns via the regexes */
-- string month;
-- string day;
-- string year;
-- string hour;
-- string minute;
-- string second;
-- string am_or_pm;
-+ std::string month;
-+ std::string day;
-+ std::string year;
-+ std::string hour;
-+ std::string minute;
-+ std::string second;
-+ std::string am_or_pm;
-
- /* time struct used to set the time_t variable */
- struct tm time_struct = {};
-@@ -334,21 +334,21 @@ int CFTPParse::getDayOfWeek(int month, int date, int year)
- return day_of_week;
- }
-
--int CFTPParse::FTPParse(string str)
-+int CFTPParse::FTPParse(std::string str)
- {
- /* Various variable to capture patterns via the regexes */
-- string permissions;
-- string link_count;
-- string owner;
-- string group;
-- string size;
-- string date;
-- string name;
-- string type;
-- string stuff;
-- string facts;
-- string version;
-- string file_id;
-+ std::string permissions;
-+ std::string link_count;
-+ std::string owner;
-+ std::string group;
-+ std::string size;
-+ std::string date;
-+ std::string name;
-+ std::string type;
-+ std::string stuff;
-+ std::string facts;
-+ std::string version;
-+ std::string file_id;
-
- /* Regex for standard Unix listing formats */
- pcrecpp::RE unix_re("^([-bcdlps])" // type
diff --git a/media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch b/media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch
deleted file mode 100644
index 95644d6921e7..000000000000
--- a/media-tv/kodi/files/kodi-17.3-unrar-vulnerability.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-See https://trac.kodi.tv/ticket/17510
-diff --git a/lib/UnrarXLib/rarvm.cpp b/lib/UnrarXLib/rarvm.cpp
-index 901c35dcb4..42df0a0110 100644
---- a/lib/UnrarXLib/rarvm.cpp
-+++ b/lib/UnrarXLib/rarvm.cpp
-@@ -873,14 +873,16 @@ void RarVM::ExecuteStandardFilter(VM_StandardFilters FilterType)
- break;
- case VMSF_DELTA:
- {
-- int DataSize=R[4],Channels=R[0],SrcPos=0,Border=DataSize*2;
-- SET_VALUE(false,&Mem[VM_GLOBALMEMADDR+0x20],DataSize);
-- if (DataSize>=VM_GLOBALMEMADDR/2)
-- break;
-- for (int CurChannel=0;CurChannel<Channels;CurChannel++)
-+ uint DataSize=R[4],Channels=R[0],SrcPos=0,Border=DataSize*2;
-+ if (DataSize>VM_MEMSIZE/2 || Channels>MAX3_UNPACK_CHANNELS || Channels==0)
-+ break;
-+
-+ // Bytes from same channels are grouped to continual data blocks,
-+ // so we need to place them back to their interleaving positions.
-+ for (uint CurChannel=0;CurChannel<Channels;CurChannel++)
- {
- byte PrevByte=0;
-- for (int DestPos=DataSize+CurChannel;DestPos<Border;DestPos+=Channels)
-+ for (uint DestPos=DataSize+CurChannel;DestPos<Border;DestPos+=Channels)
- Mem[DestPos]=(PrevByte-=Mem[SrcPos++]);
- }
- }
-diff --git a/lib/UnrarXLib/unpack.hpp b/lib/UnrarXLib/unpack.hpp
-index 83fb0f0254..36ac30d181 100644
---- a/lib/UnrarXLib/unpack.hpp
-+++ b/lib/UnrarXLib/unpack.hpp
-@@ -1,6 +1,12 @@
- #ifndef _RAR_UNPACK_
- #define _RAR_UNPACK_
-
-+// Limit maximum number of channels in RAR3 delta filter to some reasonable
-+// value to prevent too slow processing of corrupt archives with invalid
-+// channels number. Must be equal or larger than v3_MAX_FILTER_CHANNELS.
-+// No need to provide it for RAR5, which uses only 5 bits to store channels.
-+#define MAX3_UNPACK_CHANNELS 1024
-+
- enum BLOCK_TYPES {BLOCK_LZ,BLOCK_PPM};
-
- struct Decode
diff --git a/media-tv/kodi/files/kodi-17.6-nmblookup.patch b/media-tv/kodi/files/kodi-17.6-nmblookup.patch
deleted file mode 100644
index 29737f980ec1..000000000000
--- a/media-tv/kodi/files/kodi-17.6-nmblookup.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From ba2cb820f32994482a1918bd16bd0a548bb394ac Mon Sep 17 00:00:00 2001
-From: Craig Andrews <candrews@integralblue.com>
-Date: Tue, 12 Jun 2018 12:28:41 -0400
-Subject: [PATCH] [dns-cache] Only use nmblookup if HAS_FILESYSTEM_SMB
-
-nmblookup is part of SmbClient so only use it if SmbClient is present.
-
-Fixes https://trac.kodi.tv/ticket/17916
----
- xbmc/network/DNSNameCache.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/xbmc/network/DNSNameCache.cpp b/xbmc/network/DNSNameCache.cpp
-index e993c536bf41..b30c60baf738 100644
---- a/xbmc/network/DNSNameCache.cpp
-+++ b/xbmc/network/DNSNameCache.cpp
-@@ -54,7 +54,7 @@ bool CDNSNameCache::Lookup(const std::string& strHostName, std::string& strIpAdd
- if(g_DNSCache.GetCached(strHostName, strIpAddress))
- return true;
-
--#ifndef TARGET_WINDOWS
-+#if !defined(TARGET_WINDOWS) && defined(HAS_FILESYSTEM_SMB)
- // perform netbios lookup (win32 is handling this via gethostbyname)
- char nmb_ip[100];
- char line[200];
diff --git a/media-tv/kodi/files/kodi-17.6-wrapper.patch b/media-tv/kodi/files/kodi-17.6-wrapper.patch
deleted file mode 100644
index dc3e9887da94..000000000000
--- a/media-tv/kodi/files/kodi-17.6-wrapper.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bbc7a53911f1ef8a4a24b76d88c5b0e5899e082f Mon Sep 17 00:00:00 2001
-From: Michael Cronenworth <mike@cchtml.com>
-Date: Fri, 16 Mar 2018 13:48:34 -0500
-Subject: [PATCH] DllLoader: Update variable to use standard va_list type
-
-The _G_ types were ancient, internal-only types defined in _G_config.h
-and are now deprecated.
-
-https://sourceware.org/ml/libc-announce/2018/msg00000.html
-https://sourceware.org/git/?p=glibc.git;a=commit;h=48a8f8328122ab8d06b7333cb87be46feeaf7cca
-
-Signed-off-by: Michael Cronenworth <mike@cchtml.com>
----
- xbmc/cores/DllLoader/exports/wrapper.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c
-index 1980bfe65cac..7c7d4ac6131d 100644
---- a/xbmc/cores/DllLoader/exports/wrapper.c
-+++ b/xbmc/cores/DllLoader/exports/wrapper.c
-@@ -45,9 +45,6 @@ typedef int64_t off64_t;
- typedef off64_t __off64_t;
- typedef fpos_t fpos64_t;
- #define stat64 stat
--#if defined(TARGET_DARWIN) || defined(TARGET_ANDROID)
--#define _G_va_list va_list
--#endif
- #endif
-
- #ifdef TARGET_POSIX
-@@ -485,7 +482,7 @@ int __wrap___printf_chk(int flag, const char *format, ...)
- return res;
- }
-
--int __wrap___vfprintf_chk(FILE* stream, int flag, const char *format, _G_va_list ap)
-+int __wrap___vfprintf_chk(FILE* stream, int flag, const char *format, va_list ap)
- {
- return dll_vfprintf(stream, format, ap);
- }
diff --git a/media-tv/kodi/files/kodi-cmake-no-java.patch b/media-tv/kodi/files/kodi-cmake-no-java.patch
deleted file mode 100644
index 2d965ab351ee..000000000000
--- a/media-tv/kodi/files/kodi-cmake-no-java.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-diff --git a/xbmc/interfaces/swig/CMakeLists.txt b/xbmc/interfaces/swig/CMakeLists.txt
-index 6e676159eb..d45a2ecbab 100644
---- a/xbmc/interfaces/swig/CMakeLists.txt
-+++ b/xbmc/interfaces/swig/CMakeLists.txt
-@@ -1,43 +1,21 @@
- function(generate_file file)
-- set(classpath ${GROOVY_DIR}/groovy-all-${GROOVY_VER}.jar
-- ${GROOVY_DIR}/commons-lang-${COMMONS_VER}.jar
-- ${CORE_SOURCE_DIR}/tools/codegenerator
-- ${CMAKE_CURRENT_SOURCE_DIR}/../python)
-- if(NOT CORE_SYSTEM_NAME STREQUAL windows)
-- set(devnull "/dev/null")
-- string(REPLACE ";" ":" classpath "${classpath}")
-- else()
-- set(devnull "nul")
-- endif()
--
-- set(CPP_FILE ${file}.cpp)
-- add_custom_command(OUTPUT ${CPP_FILE}
-- COMMAND ${SWIG_EXECUTABLE}
-- ARGS -w401 -c++ -o ${file}.xml -xml -I${CORE_SOURCE_DIR}/xbmc -xmllang python ${CMAKE_CURRENT_SOURCE_DIR}/../swig/${file}
-- COMMAND ${Java_JAVA_EXECUTABLE}
-- ARGS -cp "${classpath}" groovy.ui.GroovyMain ${CORE_SOURCE_DIR}/tools/codegenerator/Generator.groovy ${file}.xml ${CMAKE_CURRENT_SOURCE_DIR}/../python/PythonSwig.cpp.template ${file}.cpp > ${devnull}
-- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../swig/${file})
-+ set(CPP_FILE ${CORE_SOURCE_DIR}/xbmc/interfaces/python/generated/${file}.cpp)
- set(SOURCES ${SOURCES} "${CPP_FILE}" PARENT_SCOPE)
- endfunction()
-
--find_package(Java COMPONENTS Runtime REQUIRED)
- find_package(SWIG REQUIRED)
-
- # The generated bindings
--set(INPUTS AddonModuleXbmcaddon.i
-- AddonModuleXbmcgui.i
-- AddonModuleXbmc.i
-- AddonModuleXbmcplugin.i
-- AddonModuleXbmcvfs.i
-- AddonModuleXbmcwsgi.i)
--
--set(GROOVY_DIR ${CORE_SOURCE_DIR}/tools/codegenerator/groovy)
--set(GROOVY_VER 2.4.4)
--set(COMMONS_VER 2.6)
-+set(INPUTS AddonModuleXbmcaddon
-+ AddonModuleXbmcgui
-+ AddonModuleXbmc
-+ AddonModuleXbmcplugin
-+ AddonModuleXbmcvfs
-+ AddonModuleXbmcwsgi)
-
- foreach(INPUT IN LISTS INPUTS)
- generate_file(${INPUT})
-- list(APPEND GEN_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${INPUT}.cpp)
-+ list(APPEND GEN_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${INPUT}.i.cpp)
- endforeach()
-
- add_library(python_binding STATIC ${SOURCES})