summaryrefslogtreecommitdiff
path: root/package/kodi/patches/patch-xbmc_cores_dvdplayer_DVDCodecs_DVDCodecUtils_cpp
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-03-21 00:05:48 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-03-21 00:05:54 +0100
commitab20306b70b10a860b566bf912487d1f8a6eb22e (patch)
tree2ce77f6c50572e64ac75bbd3bd50982d2835f718 /package/kodi/patches/patch-xbmc_cores_dvdplayer_DVDCodecs_DVDCodecUtils_cpp
parentf172737d165dd7c255e5020c0b57545ccb432bad (diff)
kodi: add gentoo patches to work with ffmpeg3
Diffstat (limited to 'package/kodi/patches/patch-xbmc_cores_dvdplayer_DVDCodecs_DVDCodecUtils_cpp')
-rw-r--r--package/kodi/patches/patch-xbmc_cores_dvdplayer_DVDCodecs_DVDCodecUtils_cpp79
1 files changed, 79 insertions, 0 deletions
diff --git a/package/kodi/patches/patch-xbmc_cores_dvdplayer_DVDCodecs_DVDCodecUtils_cpp b/package/kodi/patches/patch-xbmc_cores_dvdplayer_DVDCodecs_DVDCodecUtils_cpp
new file mode 100644
index 000000000..cd6c53c41
--- /dev/null
+++ b/package/kodi/patches/patch-xbmc_cores_dvdplayer_DVDCodecs_DVDCodecUtils_cpp
@@ -0,0 +1,79 @@
+--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp 2016-02-20 16:21:19.000000000 +0100
++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp 2016-03-19 18:38:18.610025667 +0100
+@@ -39,7 +39,7 @@ extern "C" {
+ #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;
+@@ -264,13 +264,13 @@ DVDVideoPicture* CDVDCodecUtils::Convert
+
+ 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_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL);
++ SWS_BILINEAR, NULL, NULL, NULL);
+ sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride);
+ sws_freeContext(ctx);
+ }
+@@ -403,25 +403,25 @@ double CDVDCodecUtils::NormalizeFramedur
+ }
+
+ 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;
+@@ -431,10 +431,10 @@ ERenderFormat CDVDCodecUtils::EFormatFro
+
+ 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;
+ }