[packages/kodi] - build fixes for ffmpeg 3 and gcc 5 - rel 5
baggins
baggins at pld-linux.org
Thu Mar 31 15:18:45 CEST 2016
commit 3b89f97e3dd4ba93ea82939b9e55f3d2ff7c2461
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Mar 31 22:18:13 2016 +0900
- build fixes for ffmpeg 3 and gcc 5
- rel 5
ffmpeg3.patch | 422 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
gcc5.patch | 17 +++
kodi.spec | 6 +-
3 files changed, 444 insertions(+), 1 deletion(-)
---
diff --git a/kodi.spec b/kodi.spec
index 0fd08b4..7b781b4 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -60,7 +60,7 @@
Summary: Kodi is a free and open source media-player and entertainment hub
Name: kodi
Version: 15.0
-Release: 4
+Release: 5
License: GPL v2+ and GPL v3+
Group: Applications/Multimedia
Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
@@ -70,6 +70,8 @@ Source1: https://github.com/xbmc/FFmpeg/archive/2.6.3-%{codename}.tar.gz
Patch0: jpeglib-boolean.patch
Patch1: disable-static.patch
Patch2: dvdread.patch
+Patch3: ffmpeg3.patch
+Patch4: gcc5.patch
URL: http://kodi.tv/
BuildRequires: Mesa-libGLU-devel
BuildRequires: OpenGL-devel
@@ -200,6 +202,8 @@ all common digital media files from local and network storage media.
%patch0 -p1
%patch1 -p1
%{?with_system_dvdread:%patch2 -p1}
+%patch3 -p1
+%patch4 -p1
rm -r lib/cximage-6.0/zlib
#rm -r lib/libhdhomerun
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644
index 0000000..d634be7
--- /dev/null
+++ b/ffmpeg3.patch
@@ -0,0 +1,422 @@
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp 2016-03-31 21:13:02.941888135 +0900
+@@ -42,7 +42,7 @@
+ #include "libswscale/swscale.h"
+ }
+
+-// allocate a new picture (PIX_FMT_YUV420P)
++// allocate a new picture (AV_PIX_FMT_YUV420P)
+ DVDVideoPicture* CDVDCodecUtils::AllocatePicture(int iWidth, int iHeight)
+ {
+ DVDVideoPicture* pPicture = new DVDVideoPicture;
+@@ -267,11 +267,11 @@
+
+ int dstformat;
+ if (format == RENDER_FMT_UYVY422)
+- dstformat = PIX_FMT_UYVY422;
++ dstformat = AV_PIX_FMT_UYVY422;
+ else
+- dstformat = PIX_FMT_YUYV422;
++ dstformat = AV_PIX_FMT_YUYV422;
+
+- struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, PIX_FMT_YUV420P,
++ struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, AV_PIX_FMT_YUV420P,
+ pPicture->iWidth, pPicture->iHeight, (AVPixelFormat)dstformat,
+ SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
+ sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride);
+@@ -464,25 +464,25 @@
+ }
+
+ struct EFormatMap {
+- PixelFormat pix_fmt;
++ AVPixelFormat pix_fmt;
+ ERenderFormat format;
+ };
+
+ static const EFormatMap g_format_map[] = {
+- { PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
+-, { PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
+-, { PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
+-, { PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
+-, { PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
+-, { PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
+-, { PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
+-, { PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
+-, { PIX_FMT_NONE , RENDER_FMT_NONE }
++ { AV_PIX_FMT_YUV420P, RENDER_FMT_YUV420P }
++, { AV_PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P }
++, { AV_PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 }
++, { AV_PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 }
++, { AV_PIX_FMT_UYVY422, RENDER_FMT_UYVY422 }
++, { AV_PIX_FMT_YUYV422, RENDER_FMT_YUYV422 }
++, { AV_PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI }
++, { AV_PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA }
++, { AV_PIX_FMT_NONE , RENDER_FMT_NONE }
+ };
+
+ ERenderFormat CDVDCodecUtils::EFormatFromPixfmt(int fmt)
+ {
+- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
+ {
+ if(p->pix_fmt == fmt)
+ return p->format;
+@@ -492,10 +492,10 @@
+
+ int CDVDCodecUtils::PixfmtFromEFormat(ERenderFormat fmt)
+ {
+- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p)
++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p)
+ {
+ if(p->format == fmt)
+ return p->pix_fmt;
+ }
+- return PIX_FMT_NONE;
++ return AV_PIX_FMT_NONE;
+ }
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2016-03-31 21:15:11.333627831 +0900
+@@ -79,8 +79,8 @@
+ STATE_SW_MULTI
+ };
+
+-enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
+- , const PixelFormat * fmt )
++enum AVPixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
++ , const AVPixelFormat * fmt )
+ {
+ CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque;
+
+@@ -97,8 +97,8 @@
+ return avcodec_default_get_format(avctx, fmt);
+ }
+
+- const PixelFormat * cur = fmt;
+- while(*cur != PIX_FMT_NONE)
++ const AVPixelFormat * cur = fmt;
++ while(*cur != AV_PIX_FMT_NONE)
+ {
+ #ifdef HAVE_LIBVDPAU
+ if(VDPAU::CDecoder::IsVDPAUFormat(*cur) && CSettings::Get().GetBool("videoplayer.usevdpau"))
+@@ -130,7 +130,7 @@
+ #endif
+ #ifdef HAVE_LIBVA
+ // mpeg4 vaapi decoding is disabled
+- if(*cur == PIX_FMT_VAAPI_VLD && CSettings::Get().GetBool("videoplayer.usevaapi"))
++ if(*cur == AV_PIX_FMT_VAAPI_VLD && CSettings::Get().GetBool("videoplayer.usevaapi"))
+ {
+ VAAPI::CDecoder* dec = new VAAPI::CDecoder();
+ if(dec->Open(avctx, ctx->m_pCodecContext, *cur, ctx->m_uSurfacesCount) == true)
+@@ -216,11 +216,11 @@
+
+ for(std::vector<ERenderFormat>::iterator it = options.m_formats.begin(); it != options.m_formats.end(); ++it)
+ {
+- m_formats.push_back((PixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
++ m_formats.push_back((AVPixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it));
+ if(*it == RENDER_FMT_YUV420P)
+- m_formats.push_back(PIX_FMT_YUVJ420P);
++ m_formats.push_back(AV_PIX_FMT_YUVJ420P);
+ }
+- m_formats.push_back(PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
++ m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */
+
+ pCodec = avcodec_find_decoder(hints.codec);
+
+@@ -660,7 +660,7 @@
+ pDvdVideoPicture->color_transfer = m_pCodecContext->color_trc;
+ pDvdVideoPicture->color_matrix = m_pCodecContext->colorspace;
+ if(m_pCodecContext->color_range == AVCOL_RANGE_JPEG
+- || m_pCodecContext->pix_fmt == PIX_FMT_YUVJ420P)
++ || m_pCodecContext->pix_fmt == AV_PIX_FMT_YUVJ420P)
+ pDvdVideoPicture->color_range = 1;
+ else
+ pDvdVideoPicture->color_range = 0;
+@@ -743,8 +743,8 @@
+ pDvdVideoPicture->iFlags |= pDvdVideoPicture->data[0] ? 0 : DVP_FLAG_DROPPED;
+ pDvdVideoPicture->extended_format = 0;
+
+- PixelFormat pix_fmt;
+- pix_fmt = (PixelFormat)m_pFrame->format;
++ AVPixelFormat pix_fmt;
++ pix_fmt = (AVPixelFormat)m_pFrame->format;
+
+ pDvdVideoPicture->format = CDVDCodecUtils::EFormatFromPixfmt(pix_fmt);
+ return true;
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h 2016-03-31 21:00:47.697798052 +0900
+@@ -46,7 +46,7 @@
+ public:
+ IHardwareDecoder() {}
+ virtual ~IHardwareDecoder() {};
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces) = 0;
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces) = 0;
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame) = 0;
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) = 0;
+ virtual int Check (AVCodecContext* avctx) = 0;
+@@ -77,7 +77,7 @@
+ void SetHardware(IHardwareDecoder* hardware);
+
+ protected:
+- static enum PixelFormat GetFormat(struct AVCodecContext * avctx, const PixelFormat * fmt);
++ static enum AVPixelFormat GetFormat(struct AVCodecContext * avctx, const AVPixelFormat * fmt);
+
+ int FilterOpen(const std::string& filters, bool scale);
+ void FilterClose();
+@@ -121,7 +121,7 @@
+ int m_iLastKeyframe;
+ double m_dts;
+ bool m_started;
+- std::vector<PixelFormat> m_formats;
++ std::vector<AVPixelFormat> m_formats;
+ double m_decoderPts;
+ int m_skippedDeint;
+ bool m_requestSkipDeint;
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2016-03-31 21:16:03.131015505 +0900
+@@ -479,7 +479,7 @@
+ Close();
+ }
+
+-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
+ {
+ // don't support broken wrappers by default
+ // nvidia cards with a vaapi to vdpau wrapper
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h 2016-03-31 21:14:41.633219057 +0900
+@@ -406,7 +406,7 @@
+ CDecoder();
+ virtual ~CDecoder();
+
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
+ virtual void Reset();
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2016-03-31 21:15:34.730618946 +0900
+@@ -483,7 +483,7 @@
+ m_vdpauConfig.context = 0;
+ }
+
+-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces)
++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces)
+ {
+ // check if user wants to decode this format with VDPAU
+ std::string gpuvendor = g_Windowing.GetRenderVendor();
+@@ -757,7 +757,7 @@
+ return 0;
+ }
+
+-bool CDecoder::IsVDPAUFormat(PixelFormat format)
++bool CDecoder::IsVDPAUFormat(AVPixelFormat format)
+ {
+ if (format == AV_PIX_FMT_VDPAU)
+ return true;
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h 2016-03-31 21:14:26.429677869 +0900
+@@ -556,7 +556,7 @@
+ CDecoder();
+ virtual ~CDecoder();
+
+- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0);
++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0);
+ virtual int Decode (AVCodecContext* avctx, AVFrame* frame);
+ virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture);
+ virtual void Reset();
+@@ -571,7 +571,7 @@
+ bool Supports(VdpVideoMixerFeature feature);
+ bool Supports(EINTERLACEMETHOD method);
+ EINTERLACEMETHOD AutoInterlaceMethod();
+- static bool IsVDPAUFormat(PixelFormat fmt);
++ static bool IsVDPAUFormat(AVPixelFormat fmt);
+
+ static void FFReleaseBuffer(void *opaque, uint8_t *data);
+ static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2016-03-31 21:16:43.421582924 +0900
+@@ -1617,7 +1617,7 @@
+
+ // for video we need a decoder to get desired information into codec context
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec->extradata &&
+- (!st->codec->width || st->codec->pix_fmt == PIX_FMT_NONE))
++ (!st->codec->width || st->codec->pix_fmt == AV_PIX_FMT_NONE))
+ {
+ // open a decoder, it will be cleared down by ffmpeg on closing the stream
+ if (!st->codec->codec)
+@@ -1674,7 +1674,7 @@
+ st = m_pFormatContext->streams[idx];
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ {
+- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
+ return true;
+ hasVideo = true;
+ }
+@@ -1687,7 +1687,7 @@
+ st = m_pFormatContext->streams[i];
+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ {
+- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE)
++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE)
+ return true;
+ hasVideo = true;
+ }
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDFileInfo.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2016-03-31 21:10:31.139940012 +0900
+@@ -275,7 +275,7 @@
+
+ uint8_t *pOutBuf = new uint8_t[nWidth * nHeight * 4];
+ struct SwsContext *context = sws_getContext(picture.iWidth, picture.iHeight,
+- PIX_FMT_YUV420P, nWidth, nHeight, PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ AV_PIX_FMT_YUV420P, nWidth, nHeight, AV_PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
+
+ if (context)
+ {
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/FFmpeg.h xbmc-15.0-Isengard/xbmc/cores/FFmpeg.h
+--- xbmc-15.0-Isengard.orig/xbmc/cores/FFmpeg.h 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/FFmpeg.h 2016-03-31 21:09:46.016055600 +0900
+@@ -39,13 +39,13 @@
+ int flags = 0;
+
+ if (cpuFeatures & CPU_FEATURE_MMX)
+- flags |= SWS_CPU_CAPS_MMX;
++ flags |= PP_CPU_CAPS_MMX;
+ if (cpuFeatures & CPU_FEATURE_MMX2)
+- flags |= SWS_CPU_CAPS_MMX2;
++ flags |= PP_CPU_CAPS_MMX2;
+ if (cpuFeatures & CPU_FEATURE_3DNOW)
+- flags |= SWS_CPU_CAPS_3DNOW;
++ flags |= PP_CPU_CAPS_3DNOW;
+ if (cpuFeatures & CPU_FEATURE_ALTIVEC)
+- flags |= SWS_CPU_CAPS_ALTIVEC;
++ flags |= PP_CPU_CAPS_ALTIVEC;
+
+ return flags;
+ }
+diff -ur xbmc-15.0-Isengard.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp xbmc-15.0-Isengard/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp 2016-03-31 21:18:55.470144206 +0900
+@@ -2932,7 +2932,7 @@
+ }
+ else if (m_format == RENDER_FMT_NV12)
+ {
+- srcFormat = PIX_FMT_NV12;
++ srcFormat = AV_PIX_FMT_NV12;
+ for (int i = 0; i < 2; i++)
+ {
+ src[i] = im->plane[i];
+@@ -2941,13 +2941,13 @@
+ }
+ else if (m_format == RENDER_FMT_YUYV422)
+ {
+- srcFormat = PIX_FMT_YUYV422;
++ srcFormat = AV_PIX_FMT_YUYV422;
+ src[0] = im->plane[0];
+ srcStride[0] = im->stride[0];
+ }
+ else if (m_format == RENDER_FMT_UYVY422)
+ {
+- srcFormat = PIX_FMT_UYVY422;
++ srcFormat = AV_PIX_FMT_UYVY422;
+ src[0] = im->plane[0];
+ srcStride[0] = im->stride[0];
+ }
+@@ -2965,7 +2965,7 @@
+
+ m_context = sws_getCachedContext(m_context,
+ im->width, im->height, (AVPixelFormat)srcFormat,
+- im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA,
++ im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA,
+ SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
+
+ uint8_t *dst[] = { m_rgbBuffer, 0, 0, 0 };
+@@ -2995,7 +2995,7 @@
+
+ if (m_format == RENDER_FMT_YUV420P)
+ {
+- srcFormat = PIX_FMT_YUV420P;
++ srcFormat = AV_PIX_FMT_YUV420P;
+ for (int i = 0; i < 3; i++)
+ {
+ srcTop[i] = im->plane[i];
+@@ -3006,7 +3006,7 @@
+ }
+ else if (m_format == RENDER_FMT_NV12)
+ {
+- srcFormat = PIX_FMT_NV12;
++ srcFormat = AV_PIX_FMT_NV12;
+ for (int i = 0; i < 2; i++)
+ {
+ srcTop[i] = im->plane[i];
+@@ -3017,7 +3017,7 @@
+ }
+ else if (m_format == RENDER_FMT_YUYV422)
+ {
+- srcFormat = PIX_FMT_YUYV422;
++ srcFormat = AV_PIX_FMT_YUYV422;
+ srcTop[0] = im->plane[0];
+ srcStrideTop[0] = im->stride[0] * 2;
+ srcBot[0] = im->plane[0] + im->stride[0];
+@@ -3025,7 +3025,7 @@
+ }
+ else if (m_format == RENDER_FMT_UYVY422)
+ {
+- srcFormat = PIX_FMT_UYVY422;
++ srcFormat = AV_PIX_FMT_UYVY422;
+ srcTop[0] = im->plane[0];
+ srcStrideTop[0] = im->stride[0] * 2;
+ srcBot[0] = im->plane[0] + im->stride[0];
+@@ -3045,7 +3045,7 @@
+
+ m_context = sws_getCachedContext(m_context,
+ im->width, im->height >> 1, (AVPixelFormat)srcFormat,
+- im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA,
++ im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA,
+ SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
+ uint8_t *dstTop[] = { m_rgbBuffer, 0, 0, 0 };
+ uint8_t *dstBot[] = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 };
+diff -ur xbmc-15.0-Isengard.orig/xbmc/pictures/Picture.cpp xbmc-15.0-Isengard/xbmc/pictures/Picture.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/pictures/Picture.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/pictures/Picture.cpp 2016-03-31 21:27:23.517415324 +0900
+@@ -330,8 +330,8 @@
+ bool CPicture::ScaleImage(uint8_t *in_pixels, unsigned int in_width, unsigned int in_height, unsigned int in_pitch,
+ uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch)
+ {
+- struct SwsContext *context = sws_getContext(in_width, in_height, PIX_FMT_BGRA,
+- out_width, out_height, PIX_FMT_BGRA,
++ struct SwsContext *context = sws_getContext(in_width, in_height, AV_PIX_FMT_BGRA,
++ out_width, out_height, AV_PIX_FMT_BGRA,
+ SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
+
+ uint8_t *src[] = { in_pixels, 0, 0, 0 };
+diff -ur xbmc-15.0-Isengard.orig/xbmc/video/FFmpegVideoDecoder.cpp xbmc-15.0-Isengard/xbmc/video/FFmpegVideoDecoder.cpp
+--- xbmc-15.0-Isengard.orig/xbmc/video/FFmpegVideoDecoder.cpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/video/FFmpegVideoDecoder.cpp 2016-03-31 21:37:37.869490415 +0900
+@@ -248,7 +248,7 @@
+ return false;
+
+ // Due to a bug in swsscale we need to allocate one extra line of data
+- if ( avpicture_alloc( m_pFrameRGB, PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
++ if ( avpicture_alloc( m_pFrameRGB, AV_PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 )
+ return false;
+ }
+
+@@ -283,7 +283,7 @@
+
+ // We got the video frame, render it into the picture buffer
+ struct SwsContext * context = sws_getContext( m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt,
+- m_frameRGBwidth, m_frameRGBheight, PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
++ m_frameRGBwidth, m_frameRGBheight, AV_PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL );
+
+ sws_scale( context, m_pFrame->data, m_pFrame->linesize, 0, m_pCodecCtx->height,
+ m_pFrameRGB->data, m_pFrameRGB->linesize );
diff --git a/gcc5.patch b/gcc5.patch
new file mode 100644
index 0000000..528fc20
--- /dev/null
+++ b/gcc5.patch
@@ -0,0 +1,17 @@
+diff -ur xbmc-15.0-Isengard.orig/xbmc/visualizations/XBMCProjectM/libprojectM/Common.hpp xbmc-15.0-Isengard/xbmc/visualizations/XBMCProjectM/libprojectM/Common.hpp
+--- xbmc-15.0-Isengard.orig/xbmc/visualizations/XBMCProjectM/libprojectM/Common.hpp 2015-07-22 03:41:29.000000000 +0900
++++ xbmc-15.0-Isengard/xbmc/visualizations/XBMCProjectM/libprojectM/Common.hpp 2016-03-31 21:46:24.945192642 +0900
+@@ -57,11 +57,11 @@
+ #endif
+
+ #ifdef LINUX
+-#define projectM_isnan isnan
++#define projectM_isnan std::isnan
+ #endif
+
+ #ifdef LINUX
+-#define projectM_isnan isnan
++#define projectM_isnan std::isnan
+ #endif
+
+ #ifdef WIN32
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kodi.git/commitdiff/3b89f97e3dd4ba93ea82939b9e55f3d2ff7c2461
More information about the pld-cvs-commit
mailing list